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
Perform the ‘update!` call and return the updated record.
Instance Method Details
#update ⇒ Object
604 605 606 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 604 def update return api_response(self.update!) end |
#update! ⇒ Object
Perform the ‘update!` call and return the updated record.
609 610 611 612 613 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 609 def update! record = self.get_record record.update!(self.get_update_params) return record end |