Hey Pete, On the latest 2-3-stable I found I had to reverse the last defaults connect statements in my routing. They now read:
# Rails default routes # map.connect ':controller/:action/:id.:format' map.connect ':controller/:action/:id' map.connect ':controller/:action' That from this change: http://github.com/rails/rails/commit/ff643ce9679ad66a5cd79c90c096496d07d6efaf Which is in prep for Rails 3. What version of Rails are you on? -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com On Thu, 2009-08-13 at 16:43 +0200, Pete Moran wrote: > Hi Guys, > > I have some strangeness with routing, using standard route > > map.connect ':controller/:action/:id' > map.connect ':controller/:action/:id.:format' > > Using console I did > > >> rts = ActionController::Routing::Routes > > >> rts.generate(:action => "edit", :controller => 'vendorlocations', :id => > >> 10) > => "/vendorlocations/10/edit" > >> rts.recognize_path("/vendorlocations/10/edit") > => {:action=>"10", :id=>"edit", :controller=>"vendorlocations"} > > 1) I don't understand why the ID is where the action is when I generate > the router > 2) And because of that the :id and :action have been switched. > > Has anyone seen this behaviour before? am I doing something wrong? > > > > Many Thanks > > Peter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

