Two Days – Two Rails Bugs

Rails is pretty awesome – but it is clearly a moving target in terms of how it works. Things work and then they break in different versions.
Today I am playing with routes and all I want it to do is check the routes in the priority order from first to last – but it seems to get confused when I add routes that don’t match at all in the routes.rb.
Yesterday’s bug was the breakage of the cookie_only feature by people who were intent on “fixing” a security bug – their fix broke a feature.
I get the sense that the bright folks in Rails have been working on 2.x for a while and that the second string in doing the maintenance on the 1.x.
I have a bad feeling that I will be checking out a copy of the rails source and fixing the damn bugs myself. Perhaps I should upgrade to the latest rails. I just don’t know – stuff that is solidly documented in the Agile development book is simply broken in the versions of rails that I run across.
Perhaps I am just down after wasting 20+ hours – first doubting myself and trying 50 ways to see if something was my fault – only to realize that it was a bug in the Rails framework.


# Adding these seems to confuse the route resolution for urls being created
# when imsti-session to the url – uncommment these when testing ims only – and
# figure out later why rails route priority seems simply broken
# The funny thing is that urls starting with imsti-session do the priority
# right – it is almost like route gets confused if it loks through too many
# wrong routes.
#map.connect ‘imsti-session.:imssession.:controller/:context/:div/:action/:id.:format’
#map.connect ‘imsti-session.:imssession.:controller/:action/:id.:format’
#map.connect ‘imsti-session.:imssession.:controller/:context/:div/:action/:id’
#map.connect ‘imsti-session.:imssession.:controller/:action/:id’
#map.connect ‘imsti-session.:imssession.:controller/:context/:div/:action’
#map.connect ‘imsti-session.:imssession.:controller/:action’
# End of the bug-exposing routes
map.connect ‘:controller/:context/:div/:action/:id.:format’
map.connect ‘:controller/:action/:id.:format’
map.connect ‘:controller/:context/:div/:action/:id’
map.connect ‘:controller/:action/:id’
map.connect ‘:controller/:context/:div/:action’
map.connect ‘:controller/:action’