Flowdock
method

include_in_memory?

Importance_0
Ruby on Rails latest stable (v4.2.1) - 0 notes - Class: CollectionAssociation
include_in_memory?(record) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations/collection_association.rb, line 606
        def include_in_memory?(record)
          if reflection.is_a?(ActiveRecord::Reflection::ThroughReflection)
            assoc = owner.association(reflection.through_reflection.name)
            assoc.reader.any? { |source|
              target_association = source.send(reflection.source_reflection.name)

              if target_association.respond_to?(:include?)
                target_association.include?(record)
              else
                target_association == record
              end
            } || target.include?(record)
          else
            target.include?(record)
          end
        end
Register or log in to add new notes.