fix(pdf): preload dossier so PDF generation is much faster on big procedures
This commit is contained in:
parent
28ebb045d8
commit
a2f18dff49
1 changed files with 4 additions and 2 deletions
|
@ -83,13 +83,15 @@ module Users
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@dossier = dossier
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.pdf do
|
format.pdf do
|
||||||
|
@dossier = dossier_with_champs(pj_template: false)
|
||||||
@include_infos_administration = false
|
@include_infos_administration = false
|
||||||
render(template: 'dossiers/show', formats: [:pdf])
|
render(template: 'dossiers/show', formats: [:pdf])
|
||||||
end
|
end
|
||||||
format.all
|
format.all do
|
||||||
|
@dossier = dossier
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue