Permalink
Browse files

Merge pull request #5246 from lest/patch-2

simplify namespace assignment in fields_for
  • Loading branch information...
2 parents 833181f + 4e8fbc0 commit ecf4db15bc6d6574ce93b1658435e162c09d80a1 @josevalim josevalim committed Mar 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/helpers/form_helper.rb
View
2 actionpack/lib/action_view/helpers/form_helper.rb
@@ -1016,7 +1016,7 @@ def fields_for(record_name, record_object = nil, fields_options = {}, &block)
fields_options, record_object = record_object, nil if record_object.is_a?(Hash) && record_object.extractable_options?
fields_options[:builder] ||= options[:builder]
fields_options[:parent_builder] = self
- fields_options[:namespace] = fields_options[:parent_builder].options[:namespace]
+ fields_options[:namespace] = options[:namespace]
case record_name
when String, Symbol

0 comments on commit ecf4db1

Please sign in to comment.