I would like to customize the following flash msg provided by devise
in the devise.en.yml file:
devise:
failure:
unconfirmed: 'You have to confirm your account before continuing.'
with ruby code in order to get a link to new_user_confirmation_path.
in other words, I want my flash message displays something like :
'You have to confirm your account before continuing. Didn't receive confirmation instructions?'
where ‘Didn’t receive confirmation instructions?’ is a link to new_user_confirmation_path.
I would like to know if I can do this without editing the user controller cause Devise doesn’t provide it by default.
Thanks for your answer!
new_user_confirmation_pathis a static url equivalent to/users/confirmation/newSo you can just do this in your devise.en.yml file:
In the controller actions where you display your flash make sure you have
.html_safee.g.flash[:error].html_safe