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
Perform the ‘destroy!` call and return the destroyed (and frozen) record.
Instance Method Details
#destroy ⇒ Object
618 619 620 621 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 618 def destroy self.destroy! return api_response("") end |
#destroy! ⇒ Object
Perform the ‘destroy!` call and return the destroyed (and frozen) record.
624 625 626 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 624 def destroy! return self.get_record.destroy! end |