Module: RESTFramework::UpdateModelMixin
- Included in:
- ModelControllerMixin
- Defined in:
- lib/rest_framework/controllers/models.rb
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
178 179 180 181 182 183 184 185 186 187 |
# File 'lib/rest_framework/controllers/models.rb', line 178 def update @record = self.get_record if @record @record.attributes(self.get_update_params) @record.save! api_response(@record, **self.get_model_serializer_config) else api_response({detail: "Record not found."}, status: 404) end end |