From a00abc150b35659165c12d135b373278e1b313a8 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Tue, 28 Feb 2017 13:45:01 -0500 Subject: Revert "Dupping a CollectionProxy should dup the load_target" I incorrectly changed behavior of `dup`. Reading the original issue I thought that `dup` should retain the original contents of the record and it's associations but it is in fact supposed to be a copy as if a record had been reinitialized. This reverts commit ca8c21df0fdbf1f03ba2f7fb16b39c3282dc1be0. --- activerecord/lib/active_record/associations/collection_proxy.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index d35fe9fe50..55bf2e0ff0 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -33,10 +33,6 @@ module ActiveRecord super klass, klass.arel_table, klass.predicate_builder end - def initialize_dup(other) # :nodoc: - @association = @association.deep_dup - end - def target @association.target end -- cgit v1.2.3