aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/inheritance.rb
diff options
context:
space:
mode:
authorKeenan Brock <kbrock@redhat.com>2014-01-22 12:55:46 -0500
committerKeenan Brock <kbrock@redhat.com>2014-01-22 13:47:34 -0500
commit8cbd500035aa64a5440d5ccc44209cfd902118fc (patch)
tree1b18f85e6239e96f230ab71a6c6e92978012df9c /activerecord/lib/active_record/inheritance.rb
parent72403003085ff6413ddf53e34561175e3dd68168 (diff)
downloadrails-8cbd500035aa64a5440d5ccc44209cfd902118fc.tar.gz
rails-8cbd500035aa64a5440d5ccc44209cfd902118fc.tar.bz2
rails-8cbd500035aa64a5440d5ccc44209cfd902118fc.zip
Move changed_attributes into dirty.rb
Move serialization dirty into serialization.rb
Diffstat (limited to 'activerecord/lib/active_record/inheritance.rb')
-rw-r--r--activerecord/lib/active_record/inheritance.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/inheritance.rb b/activerecord/lib/active_record/inheritance.rb
index da73112e90..08fc91c9df 100644
--- a/activerecord/lib/active_record/inheritance.rb
+++ b/activerecord/lib/active_record/inheritance.rb
@@ -195,8 +195,18 @@ module ActiveRecord
end
end
+ def initialize_dup(other)
+ super
+ ensure_proper_type
+ end
+
private
+ def initialize_internals_callback
+ super
+ ensure_proper_type
+ end
+
# Sets the attribute used for single table inheritance to this class name if this is not the
# ActiveRecord::Base descendant.
# Considering the hierarchy Reply < Message < ActiveRecord::Base, this makes it possible to