method

include_in_memory?

rails latest stable - Class: ActiveRecord::Associations::CollectionAssociation
include_in_memory?(record)
private

No documentation available.

# File activerecord/lib/active_record/associations/collection_association.rb, line 499
        def include_in_memory?(record)
          if reflection.is_a?(ActiveRecord::Reflection::ThroughReflection)
            assoc = owner.association(reflection.through_reflection.name)
            assoc.reader.any? { |source|
              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)
          end
        end