Hello, I have something like this on my routes: map.resources :groups do |groups| groups.resources :posts end map.resources :users do |users| users.resources :posts end I want only the "index" action available through the groups/posts url. Is there a way to do that. Thanks, Elioncho --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Philip Hallstrom
2008-Oct-03 18:03 UTC
Re: How to specify a particular action for a resource
> Hello, > > I have something like this on my routes: > > map.resources :groups do |groups| > groups.resources :posts > end > > map.resources :users do |users| > users.resources :posts > end > > I want only the "index" action available through the groups/posts url. > Is there a way to do that.You could remove the methods (ie. actions) from the controller and then they would fail with a 404. Or you can leave them in there and respond with a 422 "unprocessable entity" status. Google this list for "unprocessable_entity" and you''ll find more info. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---