Class: ApiMaker::PreloaderHasMany

Inherits:
PreloaderBase show all
Defined in:
lib/api_maker/preloader_has_many.rb

Instance Attribute Summary

Attributes inherited from PreloaderBase

#ability, #api_maker_args, #collection, #data, #locals, #records, #reflection, #reflection_name, #select, #select_columns

Instance Method Summary collapse

Methods inherited from PreloaderBase

#accessible_query, #collection_ids, #initial_join_query, #initialize, #join_query, #join_query_with_joined_name, #join_query_with_normal_name, #joined_name, #models_with_join, #unconditioned_read_access?, #underscore_name

Constructor Details

This class inherits a constructor from ApiMaker::PreloaderBase

Instance Method Details

#preloadObject



2
3
4
5
6
7
8
# File 'lib/api_maker/preloader_has_many.rb', line 2

def preload
  models.each do |model|
    preload_model(model)
  end

  models
end