From fbd917f50a6046d02dd6a64ccfb1aed0cbce68d8 Mon Sep 17 00:00:00 2001 From: Ernie Miller Date: Thu, 10 Feb 2011 14:03:25 -0500 Subject: Remove Relation#& alias for Relation#merge --- activerecord/lib/active_record/associations/association_proxy.rb | 2 +- activerecord/lib/active_record/associations/through_association.rb | 2 +- activerecord/lib/active_record/relation/spawn_methods.rb | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index 07fff7f7d7..2832f49c23 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -166,7 +166,7 @@ module ActiveRecord end def scoped - target_scope & @association_scope + target_scope.merge(@association_scope) end protected diff --git a/activerecord/lib/active_record/associations/through_association.rb b/activerecord/lib/active_record/associations/through_association.rb index 4ae0669c96..ab593d09b9 100644 --- a/activerecord/lib/active_record/associations/through_association.rb +++ b/activerecord/lib/active_record/associations/through_association.rb @@ -6,7 +6,7 @@ module ActiveRecord protected def target_scope - super & @reflection.through_reflection.klass.scoped + super.merge(@reflection.through_reflection.klass.scoped) end def association_scope diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index 69a7642ec5..4150e36a9a 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -61,8 +61,6 @@ module ActiveRecord merged_relation end - alias :& :merge - # Removes from the query the condition(s) specified in +skips+. # # Example: -- cgit v1.2.3