Module: RESTFramework::UpdateModelMixin
- Included in:
- ModelControllerMixin
- Defined in:
- lib/rest_framework/controller_mixins/models.rb
Overview
Mixin for updating records.
Instance Method Summary collapse
- #update ⇒ Object
-
#update! ⇒ Object
Helper to perform the `update!` call and return the updated record.
Instance Method Details
#update ⇒ Object
446 447 448 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 446 def update return api_response(self.update!) end |
#update! ⇒ Object
Helper to perform the `update!` call and return the updated record.
451 452 453 454 455 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 451 def update! record = self.get_record record.update!(self.get_update_params) return record end |