diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index d1b10a9281..6302491c2a 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -213,12 +213,22 @@ module ActionView # ... # <% end %> # - # And for namespaced routes, like +admin_post_url+: + # For namespaced routes, like +admin_post_url+: # # <%= form_for([:admin, @post]) do |f| %> # ... # <% end %> # + # If your resource has associations defined, for example, you want to add comments + # to the post given that the routes are set correctly: + # + # <%= form_for([@document, @comment]) do |f| %> + # ... + # <% end %> + # + # Where +@document = Document.find(params[:id])+ and + # +@comment = Comment.new+. + # # === Unobtrusive JavaScript # # Specifying: