aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/action_view_overview.textile
diff options
context:
space:
mode:
authoroamblet <oamblet@vmware.com>2010-09-15 10:11:07 +0200
committeroamblet <oamblet@vmware.com>2010-09-15 10:11:07 +0200
commitbda6de2722a859049fa72c9a5d39880bdb74252f (patch)
tree4aefe47f7a47c6927e20c7cd60764da19c87a07e /railties/guides/source/action_view_overview.textile
parentcedc49dbd3669c82a8844c13a7aa3e165062c9e7 (diff)
downloadrails-bda6de2722a859049fa72c9a5d39880bdb74252f.tar.gz
rails-bda6de2722a859049fa72c9a5d39880bdb74252f.tar.bz2
rails-bda6de2722a859049fa72c9a5d39880bdb74252f.zip
Updated old fashion form_for samples.
when 'form_for :resource, @resource ...' is found, remove the first argument (there is no need to use the :as option when the name is the same).
Diffstat (limited to 'railties/guides/source/action_view_overview.textile')
-rw-r--r--railties/guides/source/action_view_overview.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/action_view_overview.textile b/railties/guides/source/action_view_overview.textile
index 459d70f111..843dfe530d 100644
--- a/railties/guides/source/action_view_overview.textile
+++ b/railties/guides/source/action_view_overview.textile
@@ -654,7 +654,7 @@ The core method of this helper, form_for, gives you the ability to create a form
<ruby>
# Note: a @person variable will have been created in the controller (e.g. @person = Person.new)
-<%= form_for :person, @person, :url => { :action => "create" } do |f| %>
+<%= form_for @person, :url => { :action => "create" } do |f| %>
<%= f.text_field :first_name %>
<%= f.text_field :last_name %>
<%= submit_tag 'Create' %>