Permalink
Browse files

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

Fixed AR warning on ruby 2.2
  • Loading branch information...
guilleiguaran committed Dec 26, 2014
2 parents 097250e + 1a9e477 commit 9a2194245d6389d6b173c378466c38c6359100a3
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/associations/collection_association.rb
@@ -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)

0 comments on commit 9a21942

Please sign in to comment.