Merge pull request #7578 from betagouv/improve_perf_in_editor
Improve perf in editor
This commit is contained in:
commit
84a048ac47
1 changed files with 12 additions and 1 deletions
|
@ -82,7 +82,14 @@ module Administrateurs
|
|||
end
|
||||
|
||||
def show
|
||||
@procedure = current_administrateur.procedures.find(params[:id])
|
||||
@procedure = current_administrateur
|
||||
.procedures
|
||||
.includes(
|
||||
published_revision: { revision_types_de_champ: :type_de_champ },
|
||||
draft_revision: { revision_types_de_champ: :type_de_champ }
|
||||
)
|
||||
.find(params[:id])
|
||||
|
||||
@current_administrateur = current_administrateur
|
||||
@procedure_lien = commencer_url(path: @procedure.path)
|
||||
@procedure_lien_test = commencer_test_url(path: @procedure.path)
|
||||
|
@ -289,6 +296,10 @@ module Administrateurs
|
|||
redirect_to admin_procedure_experts_path(@procedure)
|
||||
end
|
||||
|
||||
def champs
|
||||
@procedure = Procedure.includes(draft_revision: { revision_types_de_champ_public: :type_de_champ }).find(@procedure.id)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def apercu_tab
|
||||
|
|
Loading…
Reference in a new issue