diff options
author | wycats <wycats@gmail.com> | 2010-08-04 04:05:28 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-08-04 04:05:54 -0700 |
commit | c25c3879ce27f5e834defd71409ea3cb2378aac6 (patch) | |
tree | 19b3e57e4d267a9b0782bd545260422afcf4f13e /activerecord/lib | |
parent | 847c123ca5ce47f1c27e8553d845b33689191ad4 (diff) | |
download | rails-c25c3879ce27f5e834defd71409ea3cb2378aac6.tar.gz rails-c25c3879ce27f5e834defd71409ea3cb2378aac6.tar.bz2 rails-c25c3879ce27f5e834defd71409ea3cb2378aac6.zip |
I'm unsure how cloning was working in Rails 3 before
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 12736d3d5b..7710aa7c54 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1400,7 +1400,7 @@ MSG # as it copies the object's attributes only, not its associations. The extent of a "deep" clone is # application specific and is therefore left to the application to implement according to its need. def initialize_copy(other) - callback(:after_initialize) if respond_to_without_attributes?(:after_initialize) + _run_after_initialize_callbacks if respond_to?(:_run_after_initialize_callbacks) cloned_attributes = other.clone_attributes(:read_attribute_before_type_cast) cloned_attributes.delete(self.class.primary_key) |