From 52ed881fa296a05374a5a3395f92a653b3721298 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 20 May 2013 17:39:29 -0700 Subject: change method name to reflect what it actually does. --- activerecord/lib/active_record/relation/merger.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/relation') 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 == :== -- cgit v1.2.3