Module: PireLoader::Patches::Base

Defined in:
lib/pire_loader/patches/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



6
7
8
# File 'lib/pire_loader/patches/base.rb', line 6

def self.prepended(base)
  base.attr_accessor :parent_relation
end

Instance Method Details

#lazy_load?(association) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
14
# File 'lib/pire_loader/patches/base.rb', line 10

def lazy_load?(association)
  return unless parent_relation

  parent_relation.lazy_load_values.include?(association)
end