Module: Jsonapi::QueryBuilder::Mixins::Include
- Included in:
- BaseQuery
- Defined in:
- lib/jsonapi/query_builder/mixins/include.rb
Instance Method Summary collapse
-
#add_includes(collection, include_params = send(:include_params)) ⇒ ActiveRecord::Relation
Eager loads the relationships that will be included in the response, based on the Json:Api include query parameter.
Instance Method Details
#add_includes(collection, include_params = send(:include_params)) ⇒ ActiveRecord::Relation
Eager loads the relationships that will be included in the response, based on the Json:Api include query parameter.
12 13 14 |
# File 'lib/jsonapi/query_builder/mixins/include.rb', line 12 def add_includes(collection, include_params = send(:include_params)) collection.includes(formatted_include_params(include_params)) end |