Envoie une notif aux followers_instructeurs le souhaitant
après chaque message déposé par l'usager
This commit is contained in:
parent
415d5c765e
commit
969478b706
7 changed files with 46 additions and 13 deletions
|
@ -197,7 +197,9 @@ module Users
|
|||
@commentaire = CommentaireService.build(current_user, dossier, commentaire_params)
|
||||
|
||||
if @commentaire.save
|
||||
dossier.followers_instructeurs.each do |instructeur|
|
||||
dossier.followers_instructeurs
|
||||
.with_instant_email_message_notifications
|
||||
.each do |instructeur|
|
||||
DossierMailer.notify_new_commentaire_to_instructeur(dossier, instructeur.email).deliver_later
|
||||
end
|
||||
flash.notice = "Votre message a bien été envoyé à l’instructeur en charge de votre dossier."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue