diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index 1df1694325610c8357b8317347ecdbb80004bc4f..15aa9ec2dd14133832af529a3d46475940eba9c0 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -1014,14 +1014,13 @@ def fields_for(record_name, record_object = nil, options = {}, &block) # <%= fields :comment do |fields| %> # <%= fields.text_field :body %> # <% end %> - # # => # # # 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 %> - # # => - # + # # => # # # Using +fields+ with +form_with+: # <%= form_with model: @post do |form| %>