Module: Emails::Groups

Included in:
Notify
Defined in:
app/mailers/emails/groups.rb

Instance Method Summary collapse

Instance Method Details

#group_email(current_user, group, subj, errors: nil) ⇒ Object


13
14
15
16
17
# File 'app/mailers/emails/groups.rb', line 13

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

#group_was_exported_email(current_user, group) ⇒ Object


5
6
7
# File 'app/mailers/emails/groups.rb', line 5

def group_was_exported_email(current_user, group)
  group_email(current_user, group, _('Group was exported'))
end

#group_was_not_exported_email(current_user, group, errors) ⇒ Object


9
10
11
# File 'app/mailers/emails/groups.rb', line 9

def group_was_not_exported_email(current_user, group, errors)
  group_email(current_user, group, _('Group export error'), errors: errors)
end