From c130ffef90189b756e3ffa62b2feb657351dbae0 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Wed, 8 Jan 2025 17:52:45 +0800 Subject: [PATCH] fix: change flash message type for errors - Update flash message from `:error` to `:danger` in the user creation process. This change improves the clarity of the flash message type, aligning it with Bootstrap's alert system, which uses `danger` for error notifications. This helps in providing better user feedback during the registration process. --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 318c31e..55c6243 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -34,7 +34,7 @@ class UsersController < ApplicationController redirect_to root_url rescue => e logger.error "User creation failed: #{e.message}" - flash[:error] = "Something went wrong. Please try again." + flash[:danger] = "Something went wrong. Please try again." render "new", status: :unprocessable_entity end else