From be8303f1c4f6210bad2553257439fa748eaeaaf3 Mon Sep 17 00:00:00 2001 From: Lisa Durand Date: Mon, 6 Nov 2023 11:22:09 +0100 Subject: [PATCH] feedback review - remove unused class and simplify method --- app/controllers/administrateurs/procedures_controller.rb | 2 +- app/views/administrateurs/procedures/close.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/administrateurs/procedures_controller.rb b/app/controllers/administrateurs/procedures_controller.rb index 0c947ea3c..1fc8aa5b6 100644 --- a/app/controllers/administrateurs/procedures_controller.rb +++ b/app/controllers/administrateurs/procedures_controller.rb @@ -316,7 +316,7 @@ module Administrateurs end def close - @published_procedures = current_administrateur.procedures.publiees.map { |p| ["#{p.libelle} (#{p.id})", p.id] }.to_h + @published_procedures = current_administrateur.procedures.publiees.to_h { |p| ["#{p.libelle} (#{p.id})", p.id] } end def allow_expert_review diff --git a/app/views/administrateurs/procedures/close.html.haml b/app/views/administrateurs/procedures/close.html.haml index 7e94bcb59..e04e0dbbd 100644 --- a/app/views/administrateurs/procedures/close.html.haml +++ b/app/views/administrateurs/procedures/close.html.haml @@ -10,7 +10,7 @@ %p= t('administrateurs.procedures.close.replacement_procedure_title') - = form_tag admin_procedure_archive_path(@procedure), method: :put, class: "form" do + = form_tag admin_procedure_archive_path(@procedure), method: :put do - if @published_procedures.present? .fr-select-group = label_tag :new_procedure, class: 'fr-label' do