Class: Gaku::Api::V1::EnrollmentsController

Inherits:
BaseController show all
Defined in:
app/controllers/gaku/api/v1/enrollments_controller.rb

Instance Attribute Summary

Attributes inherited from BaseController

#current_user

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
# File 'app/controllers/gaku/api/v1/enrollments_controller.rb', line 8

def index
  @enrollments = @enrollable.enrollments.page(params[:page])
  collection_respond_to @enrollments, root: :enrollments
end