Pass the signed-in user as the commentaire author from /contact

This commit is contained in:
Nicolas Bouilleaud 2019-07-01 18:14:02 +02:00 committed by Pierre de La Morinerie
parent 72fd5d250f
commit 7e98213829

View file

@ -64,7 +64,7 @@ class SupportController < ApplicationController
file: params[:file],
body: "[#{params[:subject]}]<br><br>#{params[:text]}"
}
commentaire = CommentaireService.build_with_email(email, dossier, attributes)
commentaire = CommentaireService.build(current_user, dossier, attributes)
commentaire.save!
end