Module: JSONAPI::Resources::EagerLoadDsl::EagerLoadHelperMethods
- Defined in:
- lib/json_api/resources/concerns/eager_load_dsl.rb
Instance Method Summary collapse
Instance Method Details
#build_eager_load_associations ⇒ Object
31 32 33 34 35 |
# File 'lib/json_api/resources/concerns/eager_load_dsl.rb', line 31 def build_eager_load_associations own_associations = @declared_eager_loads || [] inherited = inherit_eager_load_associations (inherited + own_associations).uniq end |
#inherit_eager_load_associations ⇒ Object
37 38 39 40 41 42 |
# File 'lib/json_api/resources/concerns/eager_load_dsl.rb', line 37 def inherit_eager_load_associations return [] unless superclass.respond_to?(:eager_load_associations) return [] if superclass == JSONAPI::Resource superclass.eager_load_associations end |