mirror of
https://github.com/github/rails.git
synced 2026-01-30 08:48:06 -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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user