mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #33898 from tkoyama1988/form_helpers_readable
Improve readability in form helpers guide [ci skip]
This commit is contained in:
commit
7931951ccd
1 changed files with 2 additions and 2 deletions
|
@ -775,7 +775,7 @@ You might want to render a form with a set of edit fields for each of a person's
|
||||||
<%= form_with model: @person do |person_form| %>
|
<%= form_with model: @person do |person_form| %>
|
||||||
<%= person_form.text_field :name %>
|
<%= person_form.text_field :name %>
|
||||||
<% @person.addresses.each do |address| %>
|
<% @person.addresses.each do |address| %>
|
||||||
<%= person_form.fields_for address, index: address.id do |address_form|%>
|
<%= person_form.fields_for address, index: address.id do |address_form| %>
|
||||||
<%= address_form.text_field :city %>
|
<%= address_form.text_field :city %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -972,7 +972,7 @@ This form allows users to remove addresses:
|
||||||
<ul>
|
<ul>
|
||||||
<%= f.fields_for :addresses do |addresses_form| %>
|
<%= f.fields_for :addresses do |addresses_form| %>
|
||||||
<li>
|
<li>
|
||||||
<%= addresses_form.check_box :_destroy%>
|
<%= addresses_form.check_box :_destroy %>
|
||||||
<%= addresses_form.label :kind %>
|
<%= addresses_form.label :kind %>
|
||||||
<%= addresses_form.text_field :kind %>
|
<%= addresses_form.text_field :kind %>
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in a new issue