Class: ActiveRecordApi::Rest::IndexController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ActiveRecordApi::Rest::IndexController
- Includes:
- GracefulErrors
- Defined in:
- lib/active_record_api/rest/index_controller.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#models ⇒ Object
readonly
Returns the value of attribute models.
Instance Method Summary collapse
Instance Attribute Details
#models ⇒ Object (readonly)
Returns the value of attribute models.
4 5 6 |
# File 'lib/active_record_api/rest/index_controller.rb', line 4 def models @models end |
Instance Method Details
#index ⇒ Object
8 9 10 11 12 |
# File 'lib/active_record_api/rest/index_controller.rb', line 8 def index response.headers['x-total'] = @total response.headers['x-link-next'] = next_link render json: models, each_serializer: serializer end |