wilson.smth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Mar-08 01:24 UTC
custom REST routes
Hi,
I want to make a custom route : /games/1/join which will make the
curernt user join game with id 1.
i have the route:
map.resources :games, :member => {:join => :post}
But the logs show:
"_method"=>"put", "action"=>"1",
"id"=>"join",
"controller"=>"games"}
Why isn''t it directing it to the join action with id as 1?
thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
''cause you used :join => :post. You need :join => :put if you want to use put On 3/7/08, wilson.smth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <wilson.smth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, > I want to make a custom route : /games/1/join which will make the > curernt user join game with id 1. > > i have the route: > map.resources :games, :member => {:join => :post} > > But the logs show: > "_method"=>"put", "action"=>"1", "id"=>"join", "controller"=>"games"} > > Why isn''t it directing it to the join action with id as 1? > > > > thanks > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---