From d132dd33520ba61f7bfa9ba6fdd1b7b2bebd27f3 Mon Sep 17 00:00:00 2001 From: Paul Gillard Date: Fri, 18 Jun 2010 00:02:31 +0100 Subject: Don't clone associations [#4894 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- activerecord/lib/active_record/base.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib') 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 -- cgit v1.2.3