wolfmanjm
2007-Oct-05 07:18 UTC
Upgrade from 1.2.3 to 1.2.4 broke my restful routes with :collection et al routes
Ok I see that they replaced the ; in some routes with / however this seems to have broken all my restful routes that use... map.resources :places, :collection => { :tagged => :get } Now the URL that is generated is /places/tagged (used to be / places;tagged) and I get the error Couldn''t find Place with ID=tagged So I presume there is something else I need to do, but what? There is no mention of these routes breaking. If I do /places/tagged/1 it works but I don;t have an id to pass on these routes. Thanks for any help. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
wolfmanjm
2007-Oct-05 08:14 UTC
Re: Upgrade from 1.2.3 to 1.2.4 broke my restful routes with :collection et al routes
Oh well I guess it was my fault. The upgrade and change to the routes exposed something that wasn''t a problem in 1.2.3 It turns out that you can and should do this... map.resources :places, :collection => { :tagged => :get, :top => :get }, :member => { :rate => :put } rather than have this... map.resources :places, :member => { :rate => :put } map.resources :places, :collection => { :tagged => :get } map.resources :places, :collection => { :top => :get } The latter is what was causing my problems, as it generates duplicate conflicting routes. whereas before the routes were not conflicting. All works now. On Oct 5, 12:18 am, wolfmanjm <wolfma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ok I see that they replaced the ; in some routes with / however this > seems to have broken all my restful routes that use... > > map.resources :places, :collection => { :tagged => :get } > > Now the URL that is generated is /places/tagged (used to be / > places;tagged) and I get the error > > Couldn''t find Place with ID=tagged > > So I presume there is something else I need to do, but what? There is > no mention of these routes breaking. > > If I do /places/tagged/1 it works but I don;t have an id to pass on > these routes. > > Thanks for any help.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---