mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #8306 from senny/documentation_for_hidden_field_id
Document :hidden_field_id option for fields_for [ci skip]
This commit is contained in:
commit
e95b9d6c68
1 changed files with 5 additions and 0 deletions
|
@ -702,6 +702,11 @@ module ActionView
|
|||
# <% end %>
|
||||
# ...
|
||||
# <% end %>
|
||||
#
|
||||
# Note that fields_for will automatically generate a hidden field
|
||||
# to store the ID of the record. There are circumstances where this
|
||||
# hidden field is not needed and you can pass <tt>hidden_field_id: false</tt>
|
||||
# to prevent fields_for from rendering it automatically.
|
||||
def fields_for(record_name, record_object = nil, options = {}, &block)
|
||||
builder = instantiate_builder(record_name, record_object, options)
|
||||
output = capture(builder, &block)
|
||||
|
|
Loading…
Reference in a new issue