Module: RESTFramework::Mixins::UpdateModelMixin
- Included in:
- ModelControllerMixin
- Defined in:
- lib/rest_framework/mixins/model_controller_mixin.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
740 741 742 |
# File 'lib/rest_framework/mixins/model_controller_mixin.rb', line 740 def update return render_api(self.update!) end |
#update! ⇒ Object
Perform the ‘update!` call and return the updated record.
745 746 747 748 749 |
# File 'lib/rest_framework/mixins/model_controller_mixin.rb', line 745 def update! record = self.get_record record.update!(self.get_update_params) return record end |