Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Copy the cache too

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8260 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 326548770d694fbc5dc4cccc3a293a2d4eabe0b0 1 parent e6f5429
@dhh dhh authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  activerecord/lib/active_record/base.rb
View
1  activerecord/lib/active_record/base.rb
@@ -1816,6 +1816,7 @@ def clone
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
Please sign in to comment.
Something went wrong with that request. Please try again.