about summary refs log tree commit diff
path: root/app/mailers/user_mailer.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-08-27 20:20:49 +0200
committerGitHub <noreply@github.com>2018-08-27 20:20:49 +0200
commit8852fff3a43ea4ac26aef5c7f0d72f3db3b421a0 (patch)
tree30dcf8694eadb68ca8a9579e312f9c38ad8c09d1 /app/mailers/user_mailer.rb
parentaf934b90710a2ce1099d3ceda5de7bcf0e94595c (diff)
parent53b7bb9d047cfc8b21ee0540bd3e5285267160fd (diff)
Merge pull request #675 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/mailers/user_mailer.rb')
-rw-r--r--app/mailers/user_mailer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index 9848c34a2..aa76b4dfe 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -16,7 +16,7 @@ class UserMailer < Devise::Mailer
     return if @resource.disabled?
 
     I18n.with_locale(@resource.locale || I18n.default_locale) do
-      mail to: @resource.unconfirmed_email.blank? ? @resource.email : @resource.unconfirmed_email,
+      mail to: @resource.unconfirmed_email.presence || @resource.email,
            subject: I18n.t(@resource.pending_reconfirmation? ? 'devise.mailer.reconfirmation_instructions.subject' : 'devise.mailer.confirmation_instructions.subject', instance: @instance),
            template_name: @resource.pending_reconfirmation? ? 'reconfirmation_instructions' : 'confirmation_instructions'
     end