mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Changin 'for' with 'each' on FormHelpers guide
This commit is contained in:
parent
d0373507e7
commit
93570bb321
1 changed files with 1 additions and 1 deletions
|
@ -712,7 +712,7 @@ You might want to render a form with a set of edit fields for each of a person's
|
|||
<erb>
|
||||
<%= form_for @person do |person_form| %>
|
||||
<%= person_form.text_field :name %>
|
||||
<% for address in @person.addresses %>
|
||||
<% @person.addresses.each do |address| %>
|
||||
<%= person_form.fields_for address, :index => address do |address_form|%>
|
||||
<%= address_form.text_field :city %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue