Module: RESTFramework::DestroyModelMixin

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

Overview

Mixin for destroying records.

Instance Method Summary collapse

Instance Method Details

#_destroyObject



275
276
277
278
# File 'lib/rest_framework/controller_mixins/models.rb', line 275

def _destroy
  @record = self.get_record
  @record.destroy!
end

#destroyObject



270
271
272
273
# File 'lib/rest_framework/controller_mixins/models.rb', line 270

def destroy
  self._destroy
  api_response("")
end