aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 319aa36698..cb1c13912a 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -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) }