Follow: use follow instead of toggle_follow_dossier

This commit is contained in:
Simon Lehericey 2017-07-17 12:25:43 +02:00 committed by Mathieu Magnin
parent 6cff044a50
commit f07b6eab53

View file

@ -44,9 +44,7 @@ class CommentairesController < ApplicationController
end
if is_gestionnaire?
unless current_gestionnaire.follow? @commentaire.dossier
current_gestionnaire.toggle_follow_dossier @commentaire.dossier
end
current_gestionnaire.follow(@commentaire.dossier)
redirect_to url_for(controller: 'backoffice/dossiers', action: :show, id: params['dossier_id'])
else