Skip to content

Commit ae33b4c

Browse files
fix: Adjusts the display location of the date in the report (#345)
* fix: Adjusts the display location of the date in the report * fix: test
1 parent 67c14f9 commit ae33b4c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/pdfs/header_pdf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ def header_spacing
4040
end
4141

4242
def header_current_date
43-
pdf.text "Data: #{Time.zone.now.strftime('%d/%m/%Y')}", align: :right, size: @header_font_size
43+
pdf.text_box Time.zone.now.strftime("%d/%m/%Y"), at: [60, pdf.cursor - 40], size: @header_font_size
4444
end
4545
end

spec/pdfs/header_pdf_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
it "generates a header with the correct content" do
77
user = create(:user)
88
pdf = Prawn::Document.new
9-
date = "Data: #{Time.zone.now.strftime('%d/%m/%Y')}"
9+
date = Time.zone.now.strftime("%d/%m/%Y")
1010
title = "Procedimentos"
1111

1212
described_class.new(pdf: pdf, title: title, email: user.email).generate

0 commit comments

Comments
 (0)