Method: RESTFramework::UpdateModelMixin#update

Defined in:
lib/rest_framework/controller_mixins/models.rb

#updateObject



256
257
258
259
260
261
# File 'lib/rest_framework/controller_mixins/models.rb', line 256

def update
  @record = self.get_record
  @record.update!(self.get_update_params)
  serialized_record = self.get_serializer_class.new(object: @record, controller: self).serialize
  return api_response(serialized_record)
end