Module: RESTFramework::ListModelMixin
- Included in:
- ModelControllerMixin, ReadOnlyModelControllerMixin
- Defined in:
- lib/rest_framework/controller_mixins/models.rb
Instance Method Summary collapse
-
#index ⇒ Object
TODO: pagination classes like Django.
Instance Method Details
#index ⇒ Object
TODO: pagination classes like Django
147 148 149 150 151 152 153 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 147 def index @records = self.get_filtered_recordset @serialized_records = self.get_serializer_class.new( object: @records, controller: self ).serialize return api_response(@serialized_records) end |