1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix the shadowing warning for reflection

This commit is contained in:
Roque Pinel 2015-05-28 19:10:52 -05:00
parent 2f9d88954c
commit 9b986eadf4

View file

@ -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?