Module: RESTFramework::DestroyModelMixin
- Included in:
- ModelControllerMixin
- Defined in:
- lib/rest_framework/controllers/models.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
190 191 192 193 194 195 196 197 198 |
# File 'lib/rest_framework/controllers/models.rb', line 190 def destroy @record = self.get_record if @record @record.destroy! api_response('') else api_response({detail: "Method 'DELETE' not allowed."}, status: 405) end end |