Class: ActiveRecord::Associations::Preloader::Association::LoaderRecords
- Inherits:
-
Object
- Object
- ActiveRecord::Associations::Preloader::Association::LoaderRecords
- Defined in:
- lib/active_record/associations/preloader/association.rb
Instance Method Summary collapse
-
#initialize(loaders, loader_query) ⇒ LoaderRecords
constructor
A new instance of LoaderRecords.
- #records ⇒ Object
Constructor Details
#initialize(loaders, loader_query) ⇒ LoaderRecords
Returns a new instance of LoaderRecords.
44 45 46 47 48 49 50 51 |
# File 'lib/active_record/associations/preloader/association.rb', line 44 def initialize(loaders, loader_query) @loader_query = loader_query @loaders = loaders @keys_to_load = Set.new @already_loaded_records_by_key = {} populate_keys_to_load_and_already_loaded_records end |
Instance Method Details
#records ⇒ Object
53 54 55 |
# File 'lib/active_record/associations/preloader/association.rb', line 53 def records load_records + already_loaded_records end |