Module: RESTFramework::DestroyModelMixin
- Included in:
- ModelControllerMixin
- Defined in:
- lib/rest_framework/controller_mixins/models.rb
Overview
Mixin for destroying records.
Instance Method Summary collapse
- #destroy ⇒ Object
-
#destroy! ⇒ Object
Helper to perform the `destroy!` call and return the destroyed (and frozen) record.
Instance Method Details
#destroy ⇒ Object
449 450 451 452 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 449 def destroy self.destroy! return api_response("") end |
#destroy! ⇒ Object
Helper to perform the `destroy!` call and return the destroyed (and frozen) record.
455 456 457 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 455 def destroy! return self.get_record.destroy! end |