Method: Resourcey::Controller#destroy
- Defined in:
- lib/resourcey/controller.rb
#destroy ⇒ Object
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/resourcey/controller.rb', line 39 def destroy find_resource @resource.destroy if @resource.destroyed? render json: true, status: :ok else render json: { errors: @resource.errors }, status: :bad_request end end |