diff --git a/app/controllers/api/v2/dossiers_controller.rb b/app/controllers/api/v2/dossiers_controller.rb index 83c07802d..9f5ef2033 100644 --- a/app/controllers/api/v2/dossiers_controller.rb +++ b/app/controllers/api/v2/dossiers_controller.rb @@ -3,7 +3,7 @@ class API::V2::DossiersController < API::V2::BaseController def pdf @include_infos_administration = true - render(file: 'dossiers/show', formats: [:pdf]) + render(template: 'dossiers/show', formats: [:pdf]) end def geojson diff --git a/app/controllers/instructeurs/dossiers_controller.rb b/app/controllers/instructeurs/dossiers_controller.rb index 0324f03e6..7ce205c9c 100644 --- a/app/controllers/instructeurs/dossiers_controller.rb +++ b/app/controllers/instructeurs/dossiers_controller.rb @@ -42,7 +42,7 @@ module Instructeurs respond_to do |format| format.pdf do @include_infos_administration = true - render(file: 'dossiers/show', formats: [:pdf]) + render(template: 'dossiers/show', formats: [:pdf]) end format.all end @@ -235,7 +235,7 @@ module Instructeurs def generate_pdf_for_instructeur_export @include_infos_administration = true - pdf = render_to_string(file: 'dossiers/show', formats: [:pdf]) + pdf = render_to_string(template: 'dossiers/show', formats: [:pdf]) dossier.pdf_export_for_instructeur.attach(io: StringIO.open(pdf), filename: "export-#{dossier.id}.pdf", content_type: 'application/pdf') end diff --git a/app/controllers/users/commencer_controller.rb b/app/controllers/users/commencer_controller.rb index a5ddcf5fe..fe00ec99a 100644 --- a/app/controllers/users/commencer_controller.rb +++ b/app/controllers/users/commencer_controller.rb @@ -82,7 +82,7 @@ module Users def generate_empty_pdf(procedure) @dossier = procedure.new_dossier - s = render_to_string(file: 'dossiers/dossier_vide', formats: [:pdf]) + s = render_to_string(template: 'dossiers/dossier_vide', formats: [:pdf]) send_data(s, :filename => "#{procedure.libelle}.pdf") end end diff --git a/app/controllers/users/dossiers_controller.rb b/app/controllers/users/dossiers_controller.rb index 486682003..f77eff7ab 100644 --- a/app/controllers/users/dossiers_controller.rb +++ b/app/controllers/users/dossiers_controller.rb @@ -32,7 +32,7 @@ module Users respond_to do |format| format.pdf do @include_infos_administration = false - render(file: 'dossiers/show', formats: [:pdf]) + render(template: 'dossiers/show', formats: [:pdf]) end format.all end diff --git a/app/models/attestation_template.rb b/app/models/attestation_template.rb index 6f440d1fd..4255ca474 100644 --- a/app/models/attestation_template.rb +++ b/app/models/attestation_template.rb @@ -121,7 +121,7 @@ class AttestationTemplate < ApplicationRecord def build_pdf(dossier) attestation = render_attributes_for(dossier: dossier) attestation_view = ApplicationController.render( - file: 'new_administrateur/attestation_templates/show', + template: 'new_administrateur/attestation_templates/show', formats: :pdf, assigns: { attestation: attestation } )