Class: Tomify::Api::Admin::UsersController
- Inherits:
-
Object
- Object
- Tomify::Api::Admin::UsersController
- Defined in:
- app/controllers/tomify/api/admin/users_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
2 3 4 5 6 |
# File 'app/controllers/tomify/api/admin/users_controller.rb', line 2 def destroy @record = model.find(params[:id]) return super unless @record.email == "[email protected]" || @record.id == current_user.id render json: { type: :danger, message: "You shall not pass" } end |