0
0
Fork 0

Fix confirmation email being sent to old address when changing it

This commit is contained in:
Eugen Rochko 2016-12-23 00:43:03 +01:00
parent de9b6e3a6a
commit b191afcb5b
2 changed files with 2 additions and 1 deletions

View file

@ -9,7 +9,7 @@ class UserMailer < Devise::Mailer
@token = token
I18n.with_locale(@resource.locale || I18n.default_locale) do
mail to: @resource.email
mail to: @resource.unconfirmed_email.blank? ? @resource.email : @resource.unconfirmed_email
end
end