class JSONAPI::ResourceIdTree

A tree structure representing the resource structure of the requested resource(s). This is an intermediate structure used to keep track of the resources, by identity, found at different included relationships. It will be flattened and the resource instances will be fetched from the cache or the record store.

Attributes

fragments[R]

Public Instance Methods

Private Instance Methods

init_included_relationships(fragment, include_related) click to toggle source
# File lib/jsonapi/resource_id_tree.rb, line 22
def init_included_relationships(fragment, include_related)
  include_related && include_related.each_key do |relationship_name|
    fragment.initialize_related(relationship_name)
  end
end