Remove not used param
This commit is contained in:
parent
96bbcd68ea
commit
80c1a1af2c
3 changed files with 3 additions and 3 deletions
|
@ -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))}"
|
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)
|
redirect_to admin_procedure_path(@procedure)
|
||||||
else
|
else
|
||||||
@procedure.path = @procedure.suggested_path(current_administrateur)
|
@procedure.path = @procedure.suggested_path
|
||||||
@current_administrateur = current_administrateur
|
@current_administrateur = current_administrateur
|
||||||
@closed_procedures = current_administrateur.procedures.with_discarded.closes.map { |p| ["#{p.libelle} (#{p.id})", p.id] }.to_h
|
@closed_procedures = current_administrateur.procedures.with_discarded.closes.map { |p| ["#{p.libelle} (#{p.id})", p.id] }.to_h
|
||||||
end
|
end
|
||||||
|
|
|
@ -29,7 +29,7 @@ module ProcedurePathConcern
|
||||||
!path.match?(/[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}/)
|
!path.match?(/[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}/)
|
||||||
end
|
end
|
||||||
|
|
||||||
def suggested_path(administrateur)
|
def suggested_path
|
||||||
if path_customized?
|
if path_customized?
|
||||||
return path
|
return path
|
||||||
end
|
end
|
||||||
|
|
|
@ -1365,7 +1365,7 @@ describe Procedure do
|
||||||
describe 'suggested_path' do
|
describe 'suggested_path' do
|
||||||
let(:procedure) { create(:procedure, aasm_state: :publiee, libelle: 'Inscription au Collège', zones: [create(:zone)]) }
|
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
|
context 'when the path has been customized' do
|
||||||
before { procedure.path = 'custom_path' }
|
before { procedure.path = 'custom_path' }
|
||||||
|
|
Loading…
Reference in a new issue