perf(procedure edition): validate only once to avoid reload tdc with n+1
This commit is contained in:
parent
298f223d02
commit
adbb655a4a
3 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
|||
class Procedure::Card::AnnotationsComponent < ApplicationComponent
|
||||
def initialize(procedure:)
|
||||
@procedure = procedure
|
||||
@procedure.validate(:publication)
|
||||
@count = @procedure.draft_revision.types_de_champ.private_only.size
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
class Procedure::Card::ChampsComponent < ApplicationComponent
|
||||
def initialize(procedure:)
|
||||
@procedure = procedure
|
||||
@procedure.validate(:publication)
|
||||
@count = @procedure.draft_revision.types_de_champ.public_only.size
|
||||
end
|
||||
|
||||
|
|
|
@ -98,6 +98,8 @@ module Administrateurs
|
|||
)
|
||||
.find(params[:id])
|
||||
|
||||
@procedure.validate(:publication)
|
||||
|
||||
@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