From 326548770d694fbc5dc4cccc3a293a2d4eabe0b0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 3 Dec 2007 02:22:06 +0000 Subject: [PATCH] Copy the cache too git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8260 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index c7db48167c..b67a0d3e69 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1816,6 +1816,7 @@ module ActiveRecord #:nodoc: def becomes(klass) returning klass.new do |became| became.instance_variable_set("@attributes", @attributes) + became.instance_variable_set("@attributes_cache", @attributes_cache) became.instance_variable_set("@new_record", new_record?) end end