aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-03-30 03:25:30 -0700
committerJon Leighton <j@jonathanleighton.com>2012-03-30 03:25:30 -0700
commit3a8c54396ea3965eb7601501d7bb9618ff305728 (patch)
tree18044d98cd07e0619efa4d416bc6b9dd74a347e0 /activerecord/lib/active_record
parent7dd7d76b86b2168b39fb7f0c359d84ea6df0ce41 (diff)
parent135d704a55b87b1c5371f4a552151f44964a8fed (diff)
downloadrails-3a8c54396ea3965eb7601501d7bb9618ff305728.tar.gz
rails-3a8c54396ea3965eb7601501d7bb9618ff305728.tar.bz2
rails-3a8c54396ea3965eb7601501d7bb9618ff305728.zip
Merge pull request #2945 from Casecommons/nested_attributes_module
Nested attribute setters can be overridden.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/nested_attributes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb
index 6bf0becad8..32a1dae6bc 100644
--- a/activerecord/lib/active_record/nested_attributes.rb
+++ b/activerecord/lib/active_record/nested_attributes.rb
@@ -288,7 +288,7 @@ module ActiveRecord
# def pirate_attributes=(attributes)
# assign_nested_attributes_for_one_to_one_association(:pirate, attributes, mass_assignment_options)
# end
- class_eval <<-eoruby, __FILE__, __LINE__ + 1
+ generated_feature_methods.module_eval <<-eoruby, __FILE__, __LINE__ + 1
if method_defined?(:#{association_name}_attributes=)
remove_method(:#{association_name}_attributes=)
end