Module: Associationist

Defined in:
lib/associationist.rb,
lib/associationist/mixin.rb,
lib/associationist/config.rb,
lib/associationist/version.rb,
lib/associationist/builder/singular_association.rb,
lib/associationist/builder/collection_association.rb,
lib/associationist/reflection/singular_reflection.rb,
lib/associationist/reflection/collection_reflection.rb,
lib/associationist/associations/singular_association.rb,
lib/associationist/associations/collection_association.rb,
lib/associationist/associations/preloader/singular_association.rb

Defined Under Namespace

Modules: ActiveRecordPreloaderBatchPatch, ActiveRecordPreloaderBranchPatch, ActiveRecordPreloaderPatch, Associations, Builder, Reflection Classes: Config, Mixin

Constant Summary collapse

VERSION =
'0.2.3'

Class Method Summary collapse

Class Method Details

.preload(records, associations) ⇒ Object



9
10
11
# File 'lib/associationist.rb', line 9

def self.preload records, associations
  ActiveRecord::Associations::Preloader.new(records: records, associations: associations).call
end