diff options
author | Roque Pinel <repinel@gmail.com> | 2015-05-28 19:10:52 -0500 |
---|---|---|
committer | Roque Pinel <repinel@gmail.com> | 2015-05-28 19:10:52 -0500 |
commit | 9b986eadf4514ebf175af5e23ddba6d754d08c5e (patch) | |
tree | b3ad183525998864896be089c971805e2a702a4c /activerecord | |
parent | 2f9d88954caf4fd75098e813a3ab8bf50ef6ace4 (diff) | |
download | rails-9b986eadf4514ebf175af5e23ddba6d754d08c5e.tar.gz rails-9b986eadf4514ebf175af5e23ddba6d754d08c5e.tar.bz2 rails-9b986eadf4514ebf175af5e23ddba6d754d08c5e.zip |
Fix the shadowing warning for `reflection`
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/merger.rb | 4 |
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 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? |