aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/relation/spawn_methods.rb14
1 files changed, 2 insertions, 12 deletions
diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb
index 1577a9b116..cccf413e67 100644
--- a/activerecord/lib/active_record/relation/spawn_methods.rb
+++ b/activerecord/lib/active_record/relation/spawn_methods.rb
@@ -1,17 +1,7 @@
module ActiveRecord
module SpawnMethods
- def spawn(arel_table = self.table)
- relation = self.class.new(@klass, arel_table)
-
- (Relation::ASSOCIATION_METHODS + Relation::MULTI_VALUE_METHODS).each do |query_method|
- relation.send(:"#{query_method}_values=", send(:"#{query_method}_values"))
- end
-
- Relation::SINGLE_VALUE_METHODS.each do |query_method|
- relation.send(:"#{query_method}_value=", send(:"#{query_method}_value"))
- end
-
- relation
+ def spawn
+ clone.reset
end
def merge(r)