| ||||
A blog about Ruby, Rails and other Tech. Mostly.Back to blog
We came across at least 5 issues in Rails 1.2 that affected our sites to do with routing / url_for and caching. We do have a complicated routing and caching setup, and some things like the use of dots in urls has caused problems due to rails developing the ability to recognise .xml or .rss or whatever at the end of a url. Anyway, here goes - 5 bugs reported:
I made a demo page for them also. We have been able to work around these bugs for now - in particular we find is we put our routes in a particular order (the most complicated longer ones first) then correct paths are generated by url_for, and caching works. Also by calling ActionController::Caching::Actions::ActionCachePath.path_for(controller) you can find the exact path used to cache something, and that helps in debugging or in keeping a list of cached pages in case you need to expire them. Finally, if you use query strings and the params are not appearing in generated urls, then make a route including those params - that works. Back to blog |