Browse files

I'm unsure how cloning was working in Rails 3 before

  • Loading branch information...
1 parent 963638a commit 2498cdaf14dede0238fa36a84be105c51b5ddd58 @wycats wycats committed Aug 4, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/base.rb
@@ -1400,7 +1400,7 @@ def initialize(attributes = nil)
# 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)

0 comments on commit 2498cda

Please sign in to comment.