Module: Goldiloader::ThroughAssociationPatch

Defined in:
lib/goldiloader/active_record_patches.rb

Instance Method Summary collapse

Instance Method Details

#auto_include?Boolean

Returns:

  • (Boolean)


158
159
160
161
162
# File 'lib/goldiloader/active_record_patches.rb', line 158

def auto_include?
  # Only auto include through associations if the target association is auto-loadable
  through_association = owner.association(through_reflection.name)
  through_association.auto_include? && super
end