提交 9a219424 编写于 作者: G Guillermo Iguaran

Merge pull request #18197 from vipulnsward/fix-ar-2-2warning

Fixed AR warning on ruby 2.2
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册