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.
This commit is contained in:
songtianlun 2025-01-08 17:52:45 +08:00
parent 812073b148
commit c130ffef90

View File

@ -34,7 +34,7 @@ class UsersController < ApplicationController
redirect_to root_url redirect_to root_url
rescue => e rescue => e
logger.error "User creation failed: #{e.message}" 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 render "new", status: :unprocessable_entity
end end
else else