From 04ee25dc7db98945386e2ae57cb8025f4152235c Mon Sep 17 00:00:00 2001 From: Xavier J Date: Tue, 10 Jan 2017 16:25:05 +0100 Subject: [PATCH] Fix bug post commentaire invite --- app/controllers/commentaires_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/commentaires_controller.rb b/app/controllers/commentaires_controller.rb index cdf3cb747..9506aa7f8 100644 --- a/app/controllers/commentaires_controller.rb +++ b/app/controllers/commentaires_controller.rb @@ -52,7 +52,7 @@ class CommentairesController < ApplicationController redirect_to url_for(controller: 'backoffice/dossiers', action: :show, id: params['dossier_id']) else if current_user.email != @commentaire.dossier.user.email - invite = Invite.where(dossier: @commentaire.dossier, user: current_user).first + invite = Invite.where(dossier: @commentaire.dossier, email: current_user.email).first redirect_to url_for(controller: 'users/dossiers/invites', action: :show, id: invite.id) else redirect_to url_for(controller: :recapitulatif, action: :show, dossier_id: params['dossier_id'])