Class: ForestLiana::AssociationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/forest_liana/associations_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#authenticate_user_from_jwt, #forest_user, #serialize_model, #serialize_models

Instance Method Details

#indexObject



7
8
9
10
11
12
13
14
15
# File 'app/controllers/forest_liana/associations_controller.rb', line 7

def index
  getter = HasManyGetter.new(@resource, @association, params)
  getter.perform

  render serializer: nil, json: serialize_models(getter.records,
                                                 include: includes,
                                                 count: getter.count,
                                                 params: params)
end