How to display a Rails flash notice upon redirect?
redirect_to new_user_session_path, alert: "Invalid email or password"
in place of :alert
you can use :notice
to display
Remove the .now
. So just write:
flash[:notice] = 'Successfully checked in'
redirect_to check_in_path
The .now
is specifically supposed to be used when you are just rendering and not redirecting. When redirecting, the .now
is not to be used.