1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Copy the cache too

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8260 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2007-12-03 02:22:06 +00:00
parent e6f54290af
commit 326548770d

View file

@ -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