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
754 755 756 757 |
# File 'lib/rest_framework/mixins/model_controller_mixin.rb', line 754 def destroy self.destroy! return render_api("") end |
#destroy! ⇒ Object
Perform the ‘destroy!` call and return the destroyed (and frozen) record.
760 761 762 |
# File 'lib/rest_framework/mixins/model_controller_mixin.rb', line 760 def destroy! return self.get_record.destroy! end |