1
0
Fork 0
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:
Carlos Antonio da Silva 2012-11-24 09:59:03 -08:00
commit e95b9d6c68

View file

@ -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)