Skip to content

Commit

Permalink
fix report download by identifier helper
Browse files Browse the repository at this point in the history
  • Loading branch information
anderson-mj committed Dec 3, 2024
1 parent 1d58981 commit 961ab31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/pdf_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 961ab31

Please sign in to comment.