Change CommentaireHelper#commentaire_is_from_me_class’s signature

This commit is contained in:
gregoirenovel 2018-09-11 18:35:29 +02:00
parent 3a1e44916a
commit f9230b85b2
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
module CommentaireHelper
def commentaire_is_from_me_class(commentaire, email)
if commentaire.email == email
def commentaire_is_from_me_class(commentaire, connected_user)
if commentaire.email == connected_user.email
"from-me"
end
end

View file

@ -1,7 +1,7 @@
.messagerie.container
%ul.messages-list
- dossier.commentaires.each do |commentaire|
%li.message{ class: commentaire_is_from_me_class(commentaire, connected_user.email) }
%li.message{ class: commentaire_is_from_me_class(commentaire, connected_user) }
= render partial: "shared/dossiers/messages/message", locals: { commentaire: commentaire, connected_user: connected_user, messagerie_seen_at: messagerie_seen_at }
= render partial: "shared/dossiers/messages/form", locals: { commentaire: new_commentaire, form_url: form_url }