refactor(groupe_instructeur): remove mailer should take a list of instructeurs
This commit is contained in:
parent
9fe93ded7f
commit
f49a1baeec
6 changed files with 46 additions and 10 deletions
|
@ -12,6 +12,17 @@ class GroupeInstructeurMailer < ApplicationMailer
|
|||
mail(bcc: emails, subject: subject)
|
||||
end
|
||||
|
||||
def remove_instructeurs(group, removed_instructeurs, current_instructeur_email)
|
||||
@removed_instructeur_emails = removed_instructeurs.map(&:email)
|
||||
@group = group
|
||||
@current_instructeur_email = current_instructeur_email
|
||||
|
||||
subject = "Suppression d’un instructeur dans le groupe \"#{group.label}\""
|
||||
|
||||
emails = @group.instructeurs.map(&:email)
|
||||
mail(bcc: emails, subject: subject)
|
||||
end
|
||||
|
||||
def remove_instructeur(group, instructeur, current_instructeur_email)
|
||||
@email = instructeur.email
|
||||
@group = group
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue