From 9b986eadf4514ebf175af5e23ddba6d754d08c5e Mon Sep 17 00:00:00 2001 From: Roque Pinel Date: Thu, 28 May 2015 19:10:52 -0500 Subject: Fix the shadowing warning for `reflection` --- 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 01c05462b2..dd8f0aa298 100644 --- a/activerecord/lib/active_record/relation/merger.rb +++ b/activerecord/lib/active_record/relation/merger.rb @@ -90,8 +90,8 @@ module ActiveRecord relation.preload! other.preload_values unless other.preload_values.empty? relation.includes! other.includes_values unless other.includes_values.empty? else - reflection = relation.klass.reflect_on_all_associations.find do |reflection| - reflection.class_name == other.klass.name + reflection = relation.klass.reflect_on_all_associations.find do |r| + r.class_name == other.klass.name end || return unless other.preload_values.empty? -- cgit v1.2.3