fix(pdf): preload dossier so PDF generation is much faster on big procedures

This commit is contained in:
Colin Darie 2023-10-03 18:29:55 +02:00
parent 28ebb045d8
commit a2f18dff49

View file

@ -83,13 +83,15 @@ module Users
end
def show
@dossier = dossier
respond_to do |format|
format.pdf do
@dossier = dossier_with_champs(pj_template: false)
@include_infos_administration = false
render(template: 'dossiers/show', formats: [:pdf])
end
format.all
format.all do
@dossier = dossier
end
end
end