about summary refs log tree commit diff
path: root/app/mailers
diff options
context:
space:
mode:
authorRyo Kajiwara <kfe-fecn6.prussian@s01.info>2017-10-04 20:25:24 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-10-04 13:25:24 +0200
commitd5091387c6ddbe03b118b0cfb6d74cf821b84fb2 (patch)
treee3a4b051b5b526a28a87b2d5e4fec01464e6f6bf /app/mailers
parent178f718a9b1cab57fbd9df511abe56533f12e129 (diff)
Supply @instance variable in password reset instructions / password change mailer (#5215)
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/user_mailer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index 1517c027e..c475a9911 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -18,6 +18,7 @@ class UserMailer < Devise::Mailer
   def reset_password_instructions(user, token, _opts = {})
     @resource = user
     @token    = token
+    @instance = Rails.configuration.x.local_domain
 
     I18n.with_locale(@resource.locale || I18n.default_locale) do
       mail to: @resource.email, subject: I18n.t('devise.mailer.reset_password_instructions.subject')
@@ -26,6 +27,7 @@ class UserMailer < Devise::Mailer
 
   def password_change(user, _opts = {})
     @resource = user
+    @instance = Rails.configuration.x.local_domain
 
     I18n.with_locale(@resource.locale || I18n.default_locale) do
       mail to: @resource.email, subject: I18n.t('devise.mailer.password_change.subject')