实际上我想自定义sign_up_but_unconfirmed消息,消息是
A message with a confirmation link has been sent to your email address. Please follow the link to activate your account.
我想在邮件中添加用户电子邮件ID。我想要以下消息
A message with a confirmation link has been sent to abc@example.com .Please follow the link to activate your account.
如何自定义这些错误消息?
答案 0 :(得分:1)
我认为你可以覆盖Devise的en.yml
file。
将其复制到config/locales/devise.en.yml
,找到
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
并将其更改为:
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to %{resource.email}. Please follow the link to activate your account."