nobosh
2010-Oct-11 05:01 UTC
Rails 3 - Issue with Nested Routes, It''s not allow for a custom collection?
Hello, I have the following in my routes.rb: resources :projects do resources :photos, :permissions collection do get ''yourcurrentprojects'', userprojectpermission end end But when I do, projects/3/permissions/userprojectpermission i get a routing error: No route matches "/projects/3/permissions/ userprojectpermission" Did I define this wrong? Thank you for your 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Erol Fornoles
2010-Oct-11 09:08 UTC
Re: Rails 3 - Issue with Nested Routes, It''s not allow for a custom collection?
Try this: resources :projects do resources :photos resources :permissions do collection do get ''yourcurrentprojects'', ''userprojectpermission'' end end end On Oct 11, 1:01 pm, nobosh <bhellm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, I have the following in my routes.rb: > > resources :projects do > resources :photos, :permissions > collection do > get ''yourcurrentprojects'', userprojectpermission > end > end > > But when I do, projects/3/permissions/userprojectpermission > i get a routing error: No route matches "/projects/3/permissions/ > userprojectpermission" > > Did I define this wrong? Thank you for your 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.