aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-05-20 17:39:29 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-05-20 17:39:29 -0700
commit52ed881fa296a05374a5a3395f92a653b3721298 (patch)
tree2aed70877bc669ed22b1c0b9d12983ce3563a829 /activerecord
parent3f4f56aed8b2e06817741b266a533228ce594c5b (diff)
downloadrails-52ed881fa296a05374a5a3395f92a653b3721298.tar.gz
rails-52ed881fa296a05374a5a3395f92a653b3721298.tar.bz2
rails-52ed881fa296a05374a5a3395f92a653b3721298.zip
change method name to reflect what it actually does.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/relation/merger.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/merger.rb b/activerecord/lib/active_record/relation/merger.rb
index f689682cfa..0f54d91d86 100644
--- a/activerecord/lib/active_record/relation/merger.rb
+++ b/activerecord/lib/active_record/relation/merger.rb
@@ -138,13 +138,13 @@ module ActiveRecord
if rhs_wheres.empty? || lhs_wheres.empty?
lhs_wheres + rhs_wheres
else
- sanitized_wheres(lhs_wheres, rhs_wheres) + rhs_wheres
+ reject_overwrites(lhs_wheres, rhs_wheres) + rhs_wheres
end
end
# Remove equalities from the existing relation with a LHS which is
# present in the relation being merged in.
- def sanitized_wheres(lhs_wheres, rhs_wheres)
+ def reject_overwrites(lhs_wheres, rhs_wheres)
seen = Set.new
rhs_wheres.each do |w|
seen << w.left if w.respond_to?(:operator) && w.operator == :==