Module: JSONAPI::ResourceActions::Preloading

Extended by:
ActiveSupport::Concern
Included in:
JSONAPI::ResourceActions
Defined in:
lib/json_api/controllers/concerns/resource_actions/preloading.rb

Instance Method Summary collapse

Instance Method Details

#preload_includesObject



8
9
10
11
12
13
14
15
# File 'lib/json_api/controllers/concerns/resource_actions/preloading.rb', line 8

def preload_includes
  includes_hash = build_combined_includes_hash
  return if includes_hash.empty?

  preload_resources(includes_hash)
rescue ActiveRecord::RecordNotFound
  # Will be handled by set_resource
end