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



701
702
703
704
# File 'lib/rest_framework/controller_mixins/models.rb', line 701

def destroy
  self.destroy!
  return api_response("")
end

#destroy!Object

Perform the ‘destroy!` call and return the destroyed (and frozen) record.



707
708
709
# File 'lib/rest_framework/controller_mixins/models.rb', line 707

def destroy!
  return self.get_record.destroy!
end