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
262 263 264 265 266 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 262 def _update @record = self.get_record @record.update!(self.get_update_params) return self.get_serializer_class.new(@record, controller: self).serialize end |
#update ⇒ Object
258 259 260 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 258 def update api_response(self._update) end |