perf(admin_procedure_controller): same with publication page

This commit is contained in:
simon lehericey 2022-09-30 14:38:44 +02:00 committed by LeSim
parent 7af248b4bf
commit 77289b7a80

View file

@ -235,6 +235,13 @@ module Administrateurs
end end
def publication def publication
@procedure = current_administrateur
.procedures
.includes(
published_revision: :types_de_champ,
draft_revision: :types_de_champ
).find(params[:procedure_id])
@procedure_lien = commencer_url(path: @procedure.path) @procedure_lien = commencer_url(path: @procedure.path)
@procedure_lien_test = commencer_test_url(path: @procedure.path) @procedure_lien_test = commencer_test_url(path: @procedure.path)
@procedure.path = @procedure.suggested_path(current_administrateur) @procedure.path = @procedure.suggested_path(current_administrateur)