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
148 149 150 151 152 153 154 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 148 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 |