aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorPaul Gillard <paulmgillard@gmail.com>2010-06-18 00:02:31 +0100
committerJosé Valim <jose.valim@gmail.com>2010-06-23 09:27:15 +0200
commitd132dd33520ba61f7bfa9ba6fdd1b7b2bebd27f3 (patch)
tree0795b088c14821af3ee1cc3d32e8c9402ce18e63 /activerecord/lib/active_record/base.rb
parentef7a04ea85783b94dfa033cdcd5269c125096684 (diff)
downloadrails-d132dd33520ba61f7bfa9ba6fdd1b7b2bebd27f3.tar.gz
rails-d132dd33520ba61f7bfa9ba6fdd1b7b2bebd27f3.tar.bz2
rails-d132dd33520ba61f7bfa9ba6fdd1b7b2bebd27f3.zip
Don't clone associations [#4894 state:resolved]
Cloning an active record object should be shallow in that it should copy attributes but not associations. This was no longer true as a result of #3164. Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rw-r--r--activerecord/lib/active_record/base.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 3f81ca7555..3a7db97a6a 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1433,6 +1433,7 @@ module ActiveRecord #:nodoc:
end
clear_aggregation_cache
+ clear_association_cache
@attributes_cache = {}
@new_record = true
ensure_proper_type