Module: RESTFramework::Mixins::DestroyModelMixin

Included in:
ModelControllerMixin
Defined in:
lib/rest_framework/mixins/model_controller_mixin.rb

Overview

Mixin for destroying records.

Instance Method Summary collapse

Instance Method Details

#destroyObject



686
687
688
689
# File 'lib/rest_framework/mixins/model_controller_mixin.rb', line 686

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

#destroy!Object

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



692
693
694
# File 'lib/rest_framework/mixins/model_controller_mixin.rb', line 692

def destroy!
  return self.get_record.destroy!
end