From 523f296557231e3ab77f36b5a7ce9fe11f070596 Mon Sep 17 00:00:00 2001 From: kami-zh Date: Thu, 25 Jan 2018 16:58:32 +0900 Subject: [PATCH] Fix typo in API document FormHelper#fields - Fix typo - Adjust output example to other example's format --- actionview/lib/action_view/helpers/form_helper.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index 1df1694325..15aa9ec2dd 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -1014,14 +1014,13 @@ module ActionView # <%= 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| %>