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
|
@ -254,7 +254,7 @@ module Instructeurs
|
|||
private
|
||||
|
||||
def assign_to_params
|
||||
params.require(:assign_to).permit(:daily_email_notifications_enabled, :weekly_email_notifications_enabled)
|
||||
params.require(:assign_to).permit(:instant_email_message_notifications_enabled, :daily_email_notifications_enabled, :weekly_email_notifications_enabled)
|
||||
end
|
||||
|
||||
def assign_exports
|
||||
|
|
|
@ -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