aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-07-07 12:58:46 +0200
committerXavier Noria <fxn@hashref.com>2010-07-07 12:58:46 +0200
commit64c75d6618b6bc21576e95ceb31467d1984ecb33 (patch)
tree5060a400487473e0abe9baecb9fe7bfa16355083 /actionpack
parent8735d15e61797d0e6879efbde4f1ca18b4403eff (diff)
parent0f96cea322294f84df34c43000443b249a880126 (diff)
downloadrails-64c75d6618b6bc21576e95ceb31467d1984ecb33.tar.gz
rails-64c75d6618b6bc21576e95ceb31467d1984ecb33.tar.bz2
rails-64c75d6618b6bc21576e95ceb31467d1984ecb33.zip
Merge remote branch 'docrails/master'
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb12
1 files changed, 11 insertions, 1 deletions
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: