Remove not used param

This commit is contained in:
Mathieu Magnin 2024-10-08 11:31:02 +02:00
parent 96bbcd68ea
commit 80c1a1af2c
No known key found for this signature in database
GPG key ID: 8DCAFC82D7BA654E
3 changed files with 3 additions and 3 deletions

View file

@ -286,7 +286,7 @@ module Administrateurs
flash.alert = "La date limite de dépôt des dossiers doit être postérieure à la date du jour pour réactiver la procédure. #{view_context.link_to('Veuillez la modifier', edit_admin_procedure_path(@procedure))}"
redirect_to admin_procedure_path(@procedure)
else
@procedure.path = @procedure.suggested_path(current_administrateur)
@procedure.path = @procedure.suggested_path
@current_administrateur = current_administrateur
@closed_procedures = current_administrateur.procedures.with_discarded.closes.map { |p| ["#{p.libelle} (#{p.id})", p.id] }.to_h
end

View file

@ -29,7 +29,7 @@ module ProcedurePathConcern
!path.match?(/[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}/)
end
def suggested_path(administrateur)
def suggested_path
if path_customized?
return path
end

View file

@ -1365,7 +1365,7 @@ describe Procedure do
describe 'suggested_path' do
let(:procedure) { create(:procedure, aasm_state: :publiee, libelle: 'Inscription au Collège', zones: [create(:zone)]) }
subject { procedure.suggested_path(procedure.administrateurs.first) }
subject { procedure.suggested_path }
context 'when the path has been customized' do
before { procedure.path = 'custom_path' }