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

groups.rb « emails « mailers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3c9bf41c2080c433a5d7fba11b3de1a3cc34a9bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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_with_locale(to: current_user.notification_email_for(@group), subject: subject(subj))
    end
  end
end