From 03e98229c90372061c7810613a3c3d696fc87a33 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Tue, 6 Jul 2021 15:43:29 +0200 Subject: [PATCH] a user can now see stats for closed procedure --- app/controllers/users/statistiques_controller.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/controllers/users/statistiques_controller.rb b/app/controllers/users/statistiques_controller.rb index 5ccafc2bf..e5f6f59e4 100644 --- a/app/controllers/users/statistiques_controller.rb +++ b/app/controllers/users/statistiques_controller.rb @@ -16,16 +16,11 @@ module Users private def procedure - Procedure.publiees.or(Procedure.brouillons).find_by(path: params[:path]) + Procedure.publiees_ou_closes.find_by(path: params[:path]) end def procedure_not_found - if procedure&.close? - flash.alert = t('errors.messages.procedure_archived') - else - flash.alert = t('errors.messages.procedure_not_found') - end - + flash.alert = t('errors.messages.procedure_not_found') redirect_to root_path end end