Method: BaseApiController#destroy
- Defined in:
- lib/baseapi/app/controllers/base_api_controller.rb
#destroy ⇒ Object
DELETE /models/id.json
55 56 57 58 59 60 61 |
# File 'lib/baseapi/app/controllers/base_api_controller.rb', line 55 def destroy render 'model.json.jbuilder' if transaction(-> { self.send("before_#{__method__}") if self.methods.include?("before_#{__method__}".to_sym) @model._destroy self.send("after_#{__method__}") if self.methods.include?("after_#{__method__}".to_sym) }) end |