Module: ActiveRecordCache::BelongsToPreloader

Extended by:
ActiveSupport::Concern
Defined in:
lib/activerecord_cache/belongs_to_preloader.rb

Instance Method Summary collapse

Instance Method Details

#records_for_with_caching(ids) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/activerecord_cache/belongs_to_preloader.rb', line 9

def records_for_with_caching(ids)
  if klass.use_activerecord_cache && association_key.name == klass.primary_key
    klass.find_some_through_cache(ids)
  else
    records_for_without_caching(ids)
  end
end