class JsonApiResource::Associations::Preloaders::HasManyPrefetchedPreloader
Public Instance Methods
bulk_query( objects )
click to toggle source
# File lib/json_api_resource/associations/preloaders/has_many_prefetched_preloader.rb, line 6 def bulk_query( objects ) ids = objects.map{ |o| o.send(key) }.flatten.uniq { id: ids }.merge(opts) end
distributor_class()
click to toggle source
# File lib/json_api_resource/associations/preloaders/has_many_prefetched_preloader.rb, line 15 def distributor_class JsonApiResource::Associations::Preloaders::Distributors::DistributorByTargetId end
safe?( query )
click to toggle source
# File lib/json_api_resource/associations/preloaders/has_many_prefetched_preloader.rb, line 11 def safe?( query ) query[:id].present? end