Class: Stay::Api::V1::UsersController
- Inherits:
-
BaseApiController
- Object
- BaseApiController
- Stay::Api::V1::UsersController
- Defined in:
- app/controllers/stay/api/v1/users_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/controllers/stay/api/v1/users_controller.rb', line 4 def destroy if @user.destroy render json: { message: 'User successfully deleted' }, status: :ok else render json: { error: 'Failed to delete user' }, status: :unprocessable_entity end end |