aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorJonathan Mukai & Peter Jaros <pair+jmukai+pjaros@pivotallabs.com>2011-09-08 15:39:44 -0400
committerPeter Jaros <peter.a.jaros@gmail.com>2012-03-28 19:08:31 -0400
commit135d704a55b87b1c5371f4a552151f44964a8fed (patch)
treef4072b79a71cec71b5c9835fd1722b3057578b2b /activerecord/lib/active_record
parentddaeb4b6cf6c1a1779c6e46ff49e8c5f5e0b7418 (diff)
downloadrails-135d704a55b87b1c5371f4a552151f44964a8fed.tar.gz
rails-135d704a55b87b1c5371f4a552151f44964a8fed.tar.bz2
rails-135d704a55b87b1c5371f4a552151f44964a8fed.zip
Nested attribute setters can be overridden.
Overriding implementation can call super.
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