I am developing an application that is supposed to have games, when one clicks on the game it will go to game.prestart with instructions and other stuff. There I wrote:
link_to "Play", :controller => "games", :action => "wait"
wait will wait for other players and later redirect to the “play” action
Two questions here:
1.- This is not restful but I dont know how to do it restful, start a game (show?) have 3 phases: prestart, wait and the play itself
2.- That code above will give a “no post action wait” or something like that, if I add :method =>:get I will get a No route matches. I have the method “wait” and the view already created.
Actually, what you really want is 3.11
Seems like you need additional member routes defined, that way you can generate paths using:
To generate the member route, you will need to modify your map.resources :games line in your routes.rb to be something like:
This will add a new get action of wait for each instance of @game