diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-03 02:22:06 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-03 02:22:06 +0000 |
commit | 326548770d694fbc5dc4cccc3a293a2d4eabe0b0 (patch) | |
tree | 194baf5d4743dab4c68fe44e8259ed271360219f /activerecord | |
parent | e6f54290aff2982fe1c295d4b0ac6793a55fa112 (diff) | |
download | rails-326548770d694fbc5dc4cccc3a293a2d4eabe0b0.tar.gz rails-326548770d694fbc5dc4cccc3a293a2d4eabe0b0.tar.bz2 rails-326548770d694fbc5dc4cccc3a293a2d4eabe0b0.zip |
Copy the cache too
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8260 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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 |