Class: ActiveRecordApi::Rest::IndexController

Inherits:
ApplicationController
  • Object
show all
Includes:
GracefulErrors, CanCan::ControllerAdditions
Defined in:
lib/active_record_api/rest/index_controller.rb

Direct Known Subclasses

Controller

Instance Method Summary collapse

Instance Method Details

#index ⇒ Object



14
15
16
17
18
# File 'lib/active_record_api/rest/index_controller.rb', line 14

def index
  response.headers['x-total'] = @total
  response.headers['x-link-next'] = next_link
  render json: models, each_serializer: serializer
end