Do not display gestionnaire emails in the messaging interface

fix #2302
This commit is contained in:
Paul Chavard 2018-07-26 16:14:24 +02:00 committed by gregoirenovel
parent ab8f564b1f
commit e358e72867
2 changed files with 10 additions and 2 deletions

View file

@ -14,7 +14,13 @@ class Commentaire < ApplicationRecord
after_create :notify
def header
"#{email}, #{I18n.l(created_at.localtime, format: '%d %b %Y %H:%M')}"
"#{sender}, #{I18n.l(created_at.localtime, format: '%d %b %Y %H:%M')}"
end
def sender
if email.present?
email.split('@').first
end
end
def file_url