Module: RESTFramework::UpdateModelMixin
- Included in:
- ModelControllerMixin
- Defined in:
- lib/rest_framework/controller_mixins/models.rb
Overview
Mixin for updating records.
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
218 219 220 221 222 223 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 218 def update @record = self.get_record @record.update!(self.get_update_params) serialized_record = self.get_serializer_class.new(object: @record, controller: self).serialize return api_response(serialized_record) end |