Change CommentaireHelper#commentaire_is_from_me_class’s signature
This commit is contained in:
parent
3a1e44916a
commit
f9230b85b2
2 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
module CommentaireHelper
|
module CommentaireHelper
|
||||||
def commentaire_is_from_me_class(commentaire, email)
|
def commentaire_is_from_me_class(commentaire, connected_user)
|
||||||
if commentaire.email == email
|
if commentaire.email == connected_user.email
|
||||||
"from-me"
|
"from-me"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
.messagerie.container
|
.messagerie.container
|
||||||
%ul.messages-list
|
%ul.messages-list
|
||||||
- dossier.commentaires.each do |commentaire|
|
- 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/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 }
|
= render partial: "shared/dossiers/messages/form", locals: { commentaire: new_commentaire, form_url: form_url }
|
||||||
|
|
Loading…
Reference in a new issue