Module: RESTFramework::DestroyModelMixin
- Included in:
- ModelControllerMixin
- Defined in:
- lib/rest_framework/controller_mixins/models.rb
Overview
Mixin for destroying records.
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
289 290 291 292 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 289 def destroy self.destroy! api_response("") end |
#destroy! ⇒ Object
294 295 296 297 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 294 def destroy! @record ||= self.get_record @record.destroy! end |