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
16
# File 'lib/json_api/controllers/concerns/resource_actions/preloading.rb', line 8

def preload_includes
  includes = parse_include_param
  return if includes.empty?

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