From e933a80c55efa633c302c1143c8664697c99e265 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 26 May 2021 17:55:18 +0200 Subject: [PATCH] remove useless archivable_months Co-authored-by: Christophe Robillard --- app/controllers/instructeurs/archives_controller.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/controllers/instructeurs/archives_controller.rb b/app/controllers/instructeurs/archives_controller.rb index 097bfc106..fb5182478 100644 --- a/app/controllers/instructeurs/archives_controller.rb +++ b/app/controllers/instructeurs/archives_controller.rb @@ -5,7 +5,6 @@ module Instructeurs def index @procedure = procedure @average_dossier_weight = procedure.average_dossier_weight - @archivable_months = archivable_months @count_dossiers_termines_by_month = Traitement.count_dossiers_termines_by_month(@procedure) @nb_dossiers = @count_dossiers_termines_by_month.sum { |count_by_month| count_by_month["count"] } @poids_total = @nb_dossiers * @average_dossier_weight @@ -36,16 +35,6 @@ module Instructeurs end end - def archivable_months - start_date = procedure.published_at.to_date - end_date = Time.zone.now.to_date - - (start_date...end_date) - .map(&:beginning_of_month) - .uniq - .reverse - end - def procedure current_instructeur .procedures