perf: 500 queries -> 250 procedure show (id: 34908)
This commit is contained in:
parent
9cfa6205b5
commit
c0e8a07868
1 changed files with 8 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)
|
||||
|
|
Loading…
Reference in a new issue