diff options
author | kami-zh <hiroki.zenigami@gmail.com> | 2018-01-25 16:58:32 +0900 |
---|---|---|
committer | kami-zh <hiroki.zenigami@gmail.com> | 2018-01-25 16:58:32 +0900 |
commit | 523f296557231e3ab77f36b5a7ce9fe11f070596 (patch) | |
tree | 515a3972591e35d58801a4aca1e67344fa2ae44b /actionview | |
parent | 057ba1280b1a5a33446387b286adb4a75acdebe4 (diff) | |
download | rails-523f296557231e3ab77f36b5a7ce9fe11f070596.tar.gz rails-523f296557231e3ab77f36b5a7ce9fe11f070596.tar.bz2 rails-523f296557231e3ab77f36b5a7ce9fe11f070596.zip |
Fix typo in API document FormHelper#fields
- Fix typo
- Adjust output example to other example's format
Diffstat (limited to 'actionview')
-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| %> |