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:
parent
2cd2f51ded
commit
99b5020eb2
1 changed files with 1 additions and 0 deletions
|
@ -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) }
|
||||
|
|
Loading…
Reference in a new issue