1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Edited actionpack/lib/action_view/helpers/form_helper.rb via GitHub

This commit is contained in:
José Valim 2011-05-22 04:27:28 -07:00
parent 2cd2f51ded
commit 99b5020eb2

View file

@ -1229,6 +1229,7 @@ module ActionView
RUBY_EVAL
end
# Check +fields_for+ for docs and examples.
def fields_for_with_index(record_name, record_object = nil, fields_options = {}, &block)
index = fields_options[:index] || options[:child_index] || nested_child_index(@object_name)
block_with_index = Proc.new{ |obj| block.call(obj, index) }