{"id":384,"date":"2007-11-12T23:56:51","date_gmt":"2007-11-13T03:56:51","guid":{"rendered":"http:\/\/www.dr-chuck.com\/wordpress\/?p=384"},"modified":"2011-12-17T12:24:27","modified_gmt":"2011-12-17T16:24:27","slug":"two-days-two-rails-bugs","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2007\/11\/two-days-two-rails-bugs\/","title":{"rendered":"Two Days &#8211; Two Rails Bugs"},"content":{"rendered":"<p>Rails is pretty awesome &#8211; but it is clearly a moving target in terms of how it works.  Things work and then they break in different versions.<br \/>\nToday I am playing with routes and all I want it to do is check the routes in the priority order from first to last &#8211; but it seems to get confused when I add routes that don&#8217;t match at all in the routes.rb.<br \/>\nYesterday&#8217;s bug was the breakage of the cookie_only feature by people who were intent on &#8220;fixing&#8221; a security bug &#8211; their fix broke a feature.<br \/>\nI 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.<br \/>\nI 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&#8217;t know &#8211; stuff that is solidly documented in the Agile development book is simply broken in the versions of rails that I run across.<br \/>\nPerhaps I am just down after wasting 20+ hours &#8211; first doubting myself and trying 50 ways to see if something was my fault &#8211; only to realize that it was a bug in the Rails framework.<\/p>\n<p><!--more--><br \/>\n# Adding these seems to confuse the route resolution for urls being created<br \/>\n# when imsti-session to the url &#8211; uncommment these when testing ims only &#8211; and<br \/>\n# figure out later why rails route priority seems simply broken<br \/>\n# The funny thing is that urls starting with imsti-session do the priority<br \/>\n# right &#8211; it is almost like route gets confused if it loks through too many<br \/>\n# wrong routes.<br \/>\n#map.connect &#8216;imsti-session.:imssession.:controller\/:context\/:div\/:action\/:id.:format&#8217;<br \/>\n#map.connect &#8216;imsti-session.:imssession.:controller\/:action\/:id.:format&#8217;<br \/>\n#map.connect &#8216;imsti-session.:imssession.:controller\/:context\/:div\/:action\/:id&#8217;<br \/>\n#map.connect &#8216;imsti-session.:imssession.:controller\/:action\/:id&#8217;<br \/>\n#map.connect &#8216;imsti-session.:imssession.:controller\/:context\/:div\/:action&#8217;<br \/>\n#map.connect &#8216;imsti-session.:imssession.:controller\/:action&#8217;<br \/>\n# End of the bug-exposing routes<br \/>\nmap.connect &#8216;:controller\/:context\/:div\/:action\/:id.:format&#8217;<br \/>\nmap.connect &#8216;:controller\/:action\/:id.:format&#8217;<br \/>\nmap.connect &#8216;:controller\/:context\/:div\/:action\/:id&#8217;<br \/>\nmap.connect &#8216;:controller\/:action\/:id&#8217;<br \/>\nmap.connect &#8216;:controller\/:context\/:div\/:action&#8217;<br \/>\nmap.connect &#8216;:controller\/:action&#8217;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rails is pretty awesome &#8211; 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 &#8211; but it [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-384","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=384"}],"version-history":[{"count":1,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/384\/revisions"}],"predecessor-version":[{"id":2493,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/384\/revisions\/2493"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}