Change invites autorisation in commentaire model

This commit is contained in:
Xavier J 2016-12-26 14:45:42 +01:00
parent 9a0a391c40
commit 48451553b9

View file

@ -13,7 +13,7 @@ class Commentaire < ActiveRecord::Base
private
def internal_notification
if email == dossier.user.email || dossier.invites.pluck(:email).to_a.include?(email)
if email == dossier.user.email || dossier.invites_user.pluck(:email).to_a.include?(email)
NotificationService.new('commentaire', self.dossier.id).notify
end
end