Module: ArLazyPreload::Base

Defined in:
lib/ar_lazy_preload/active_record/base.rb

Overview

ActiveRecord::Base patch with lazy preloading support

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#lazy_preload_contextObject

Returns the value of attribute lazy_preload_context.



10
11
12
# File 'lib/ar_lazy_preload/active_record/base.rb', line 10

def lazy_preload_context
  @lazy_preload_context
end

Class Method Details

.included(base) ⇒ Object



6
7
8
# File 'lib/ar_lazy_preload/active_record/base.rb', line 6

def self.included(base)
  base.class.delegate :lazy_preload, to: :all
end