Method: JSONAPI::Resource.apply_includes
- Defined in:
- lib/jsonapi/resource.rb
.apply_includes(records, options = {}) ⇒ Object
614 615 616 617 618 619 620 621 622 |
# File 'lib/jsonapi/resource.rb', line 614 def apply_includes(records, = {}) include_directives = [:include_directives] if include_directives model_includes = resolve_relationship_names_to_relations(self, include_directives.model_includes, ) records = records.includes(model_includes) end records end |