mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Changin 'for' with 'each' on FormHelpers guide
This commit is contained in:
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user