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
- #destroy ⇒ Object
-
#destroy! ⇒ Object
Perform the ‘destroy!` call and return the destroyed (and frozen) record.
Instance Method Details
#destroy ⇒ Object
785 786 787 788 |
# File 'lib/rest_framework/mixins/model_controller_mixin.rb', line 785 def destroy self.destroy! render(api: "") end |
#destroy! ⇒ Object
Perform the ‘destroy!` call and return the destroyed (and frozen) record.
791 792 793 |
# File 'lib/rest_framework/mixins/model_controller_mixin.rb', line 791 def destroy! return self.get_record.destroy! end |