Skip to content

Instantly share code, notes, and snippets.

@jlebrech
Created March 14, 2012 18:31
Show Gist options
  • Save jlebrech/2038496 to your computer and use it in GitHub Desktop.
Save jlebrech/2038496 to your computer and use it in GitHub Desktop.
Nested resource form
<%= form_for([@game,@message_template]) do |f| %>
def edit
@message_template = MessageTemplate.find(params[:id])
@game = Game.where(:slug => params[:game_id])
end
@jlebrech
Copy link
Author

My structure /games/:game_id/message_templates/:id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment