aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorErnie Miller <ernie@metautonomo.us>2011-02-10 14:03:25 -0500
committerAaron Patterson <aaron.patterson@gmail.com>2011-02-12 17:23:19 -0800
commitfbd917f50a6046d02dd6a64ccfb1aed0cbce68d8 (patch)
tree0c7ee4599878c0f2c81d7c0fab7b6691dc3fd945 /activerecord/lib/active_record
parent7eb554bdb13d3469712b847add2ab0054f0698c7 (diff)
downloadrails-fbd917f50a6046d02dd6a64ccfb1aed0cbce68d8.tar.gz
rails-fbd917f50a6046d02dd6a64ccfb1aed0cbce68d8.tar.bz2
rails-fbd917f50a6046d02dd6a64ccfb1aed0cbce68d8.zip
Remove Relation#& alias for Relation#merge
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/associations/association_proxy.rb2
-rw-r--r--activerecord/lib/active_record/associations/through_association.rb2
-rw-r--r--activerecord/lib/active_record/relation/spawn_methods.rb2
3 files changed, 2 insertions, 4 deletions
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: