about summary refs log tree commit diff
path: root/app/mailers/user_mailer.rb
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-02-23 15:05:00 -0600
committerGitHub <noreply@github.com>2018-02-23 15:05:00 -0600
commitf53953d28a24fe65f1ca66d85a1416ba30dcda86 (patch)
tree4e9e2214629b46ddc98fdce358abc812112f13fa /app/mailers/user_mailer.rb
parent544543e40a723d9719f5571bd4c3455a6a69fccd (diff)
parentf2f19e1f8a3a048cf0a0041ae54d912acfea7742 (diff)
Merge pull request #369 from KnzkDev/merge-upstream
Merge with upstream @ e668180044560e28bdc5eef94744c210013efcda
Diffstat (limited to 'app/mailers/user_mailer.rb')
-rw-r--r--app/mailers/user_mailer.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index 2fc9caba3..9848c34a2 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -66,4 +66,16 @@ class UserMailer < Devise::Mailer
       mail to: @resource.email, subject: I18n.t('user_mailer.welcome.subject')
     end
   end
+
+  def backup_ready(user, backup)
+    @resource = user
+    @instance = Rails.configuration.x.local_domain
+    @backup   = backup
+
+    return if @resource.disabled?
+
+    I18n.with_locale(@resource.locale || I18n.default_locale) do
+      mail to: @resource.email, subject: I18n.t('user_mailer.backup_ready.subject')
+    end
+  end
 end