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
279 280 281 282 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 279 def destroy self.destroy! api_response("") end |
#destroy! ⇒ Object
284 285 286 287 |
# File 'lib/rest_framework/controller_mixins/models.rb', line 284 def destroy! @record ||= self.get_record @record.destroy! end |