Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/mailers/emails/groups.rb')
-rw-r--r--app/mailers/emails/groups.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/mailers/emails/groups.rb b/app/mailers/emails/groups.rb
new file mode 100644
index 00000000000..07812a01202
--- /dev/null
+++ b/app/mailers/emails/groups.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module Emails
+ module Groups
+ def group_was_exported_email(current_user, group)
+ group_email(current_user, group, _('Group was exported'))
+ end
+
+ def group_was_not_exported_email(current_user, group, errors)
+ group_email(current_user, group, _('Group export error'), errors: errors)
+ end
+
+ def group_email(current_user, group, subj, errors: nil)
+ @group = group
+ @errors = errors
+ mail(to: current_user.notification_email_for(@group), subject: subject(subj))
+ end
+ end
+end