- Changed target
to target_reflection
to avoid warning possible reference to past scope
This commit is contained in:
parent
d8e0b8ab55
commit
1a9e47777c
@ -597,8 +597,8 @@ def include_in_memory?(record)
|
||||
if reflection.is_a?(ActiveRecord::Reflection::ThroughReflection)
|
||||
assoc = owner.association(reflection.through_reflection.name)
|
||||
assoc.reader.any? { |source|
|
||||
target = source.send(reflection.source_reflection.name)
|
||||
target.respond_to?(:include?) ? target.include?(record) : target == record
|
||||
target_reflection = source.send(reflection.source_reflection.name)
|
||||
target_reflection.respond_to?(:include?) ? target_reflection.include?(record) : target_reflection == record
|
||||
} || target.include?(record)
|
||||
else
|
||||
target.include?(record)
|
||||
|
Loading…
Reference in New Issue
Block a user