Commentaire#internal_notification => #notify_gestionnaires
This commit is contained in:
parent
c65b1e232a
commit
cae3e1f420
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ class Commentaire < ActiveRecord::Base
|
|||
|
||||
belongs_to :piece_justificative
|
||||
|
||||
after_save :internal_notification
|
||||
after_save :notify_gestionnaires
|
||||
|
||||
def header
|
||||
"#{email}, " + I18n.l(created_at.localtime, format: '%d %b %Y %H:%M')
|
||||
|
@ -12,7 +12,7 @@ class Commentaire < ActiveRecord::Base
|
|||
|
||||
private
|
||||
|
||||
def internal_notification
|
||||
def notify_gestionnaires
|
||||
if email == dossier.user.email || dossier.invites_user.pluck(:email).to_a.include?(email)
|
||||
NotificationService.new('commentaire', self.dossier.id).notify
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue