From 961ab31f7e7c2351d3a691769bdf8e9993bf3151 Mon Sep 17 00:00:00 2001 From: Anderson Meireles Date: Tue, 3 Dec 2024 13:49:26 -0300 Subject: [PATCH] fix report download by identifier helper --- app/helpers/pdf_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/pdf_helper.rb b/app/helpers/pdf_helper.rb index b3ccef11..512b29f9 100644 --- a/app/helpers/pdf_helper.rb +++ b/app/helpers/pdf_helper.rb @@ -134,7 +134,7 @@ def signature_footer(pdf, options = {}) pdf.stroke_bounds if options[:qr_code_signature] - qrcode_url = reports_url(identifier: @qrcode_identifier, host: ENV["RAILS_RELATIVE_URL_ROOT"] || "") + qrcode_url = download_by_identifier_reports_url(identifier: @qrcode_identifier) qrcode_signature_warning = I18n.t("pdf_content.enrollment.footer.qrcode_signature_warning") signed_at = "#{I18n.t("pdf_content.enrollment.footer.signed_by_qrcode")} #{I18n.l(Time.now, format: :defaultdatetime)} (Horário de Brasília)" you_can_also_access = I18n.t("pdf_content.enrollment.footer.you_can_also_access") @@ -501,7 +501,7 @@ def qrcode_signature(pdf, options = {}) @qrcode_identifier = generate_qr_code_key end - data = reports_url(identifier: @qrcode_identifier, host: ENV["RAILS_RELATIVE_URL_ROOT"] || "") + data = download_by_identifier_reports_url(identifier: @qrcode_identifier) pdf.print_qr_code(data, extent: options[:size] || 80, align: :center) end