diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2015-06-05 19:49:44 +0000 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2015-06-05 19:49:44 +0000 |
commit | 423f14183f31565cc68d0674733b7b9edf3814a6 (patch) | |
tree | fd9e4297b44e647a3bc8cc14cb2e16f6c2004946 /guides/source/form_helpers.md | |
parent | 367395550627328fadf1e8143f65c4266984df2c (diff) | |
parent | de74fe74a815a6fbf1384adbd3ac8b815b48868e (diff) | |
download | rails-423f14183f31565cc68d0674733b7b9edf3814a6.tar.gz rails-423f14183f31565cc68d0674733b7b9edf3814a6.tar.bz2 rails-423f14183f31565cc68d0674733b7b9edf3814a6.zip |
Merge branch 'master' of github.com:rails/docrails
Diffstat (limited to 'guides/source/form_helpers.md')
-rw-r--r-- | guides/source/form_helpers.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/form_helpers.md b/guides/source/form_helpers.md index 853227e2a1..8f7d97844e 100644 --- a/guides/source/form_helpers.md +++ b/guides/source/form_helpers.md @@ -291,8 +291,8 @@ You can create a similar binding without actually creating `<form>` tags with th ```erb <%= form_for @person, url: {action: "create"} do |person_form| %> <%= person_form.text_field :name %> - <%= fields_for @person.contact_detail do |contact_details_form| %> - <%= contact_details_form.text_field :phone_number %> + <%= fields_for @person.contact_detail do |contact_detail_form| %> + <%= contact_detail_form.text_field :phone_number %> <% end %> <% end %> ``` @@ -441,7 +441,7 @@ Whenever Rails sees that the internal value of an option being generated matches TIP: The second argument to `options_for_select` must be exactly equal to the desired internal value. In particular if the value is the integer `2` you cannot pass `"2"` to `options_for_select` - you must pass `2`. Be aware of values extracted from the `params` hash as they are all strings. -WARNING: when `:include_blank` or `:prompt` are not present, `:include_blank` is forced true if the select attribute `required` is true, display `size` is one and `multiple` is not true. +WARNING: When `:include_blank` or `:prompt` are not present, `:include_blank` is forced true if the select attribute `required` is true, display `size` is one and `multiple` is not true. You can add arbitrary attributes to the options using hashes: |