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:
parent
e6f54290af
commit
326548770d
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue