diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2018-01-25 09:30:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-25 09:30:47 +0100 |
commit | 5db2681745a64b29cd817149f9cb83c8ad264761 (patch) | |
tree | 515a3972591e35d58801a4aca1e67344fa2ae44b | |
parent | 057ba1280b1a5a33446387b286adb4a75acdebe4 (diff) | |
parent | 523f296557231e3ab77f36b5a7ce9fe11f070596 (diff) | |
download | rails-5db2681745a64b29cd817149f9cb83c8ad264761.tar.gz rails-5db2681745a64b29cd817149f9cb83c8ad264761.tar.bz2 rails-5db2681745a64b29cd817149f9cb83c8ad264761.zip |
Merge pull request #31787 from kami-zh/fix-document
Fix typo in API document FormHelper#fields
-rw-r--r-- | actionview/lib/action_view/helpers/form_helper.rb | 7 |
1 files 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 %> - # # => <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| %> |