mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix typo in API document FormHelper#fields
- Fix typo - Adjust output example to other example's format
This commit is contained in:
parent
057ba1280b
commit
523f296557
1 changed files with 3 additions and 4 deletions
|
@ -1014,14 +1014,13 @@ module ActionView
|
|||
# <%= fields :comment do |fields| %>
|
||||
# <%= fields.text_field :body %>
|
||||
# <% end %>
|
||||
# # => <input type="text" name="comment[body]>
|
||||
# # => <input type="text" name="comment[body]">
|
||||
#
|
||||
# # Using a model infers the scope and assigns field values:
|
||||
# <%= fields model: Comment.new(body: "full bodied") do |fields| %<
|
||||
# <%= fields model: Comment.new(body: "full bodied") do |fields| %>
|
||||
# <%= fields.text_field :body %>
|
||||
# <% end %>
|
||||
# # =>
|
||||
# <input type="text" name="comment[body] value="full bodied">
|
||||
# # => <input type="text" name="comment[body]" value="full bodied">
|
||||
#
|
||||
# # Using +fields+ with +form_with+:
|
||||
# <%= form_with model: @post do |form| %>
|
||||
|
|
Loading…
Reference in a new issue