We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67c14f9 commit ae33b4cCopy full SHA for ae33b4c
app/pdfs/header_pdf.rb
@@ -40,6 +40,6 @@ def header_spacing
40
end
41
42
def header_current_date
43
- pdf.text "Data: #{Time.zone.now.strftime('%d/%m/%Y')}", align: :right, size: @header_font_size
+ pdf.text_box Time.zone.now.strftime("%d/%m/%Y"), at: [60, pdf.cursor - 40], size: @header_font_size
44
45
spec/pdfs/header_pdf_spec.rb
@@ -6,7 +6,7 @@
6
it "generates a header with the correct content" do
7
user = create(:user)
8
pdf = Prawn::Document.new
9
- date = "Data: #{Time.zone.now.strftime('%d/%m/%Y')}"
+ date = Time.zone.now.strftime("%d/%m/%Y")
10
title = "Procedimentos"
11
12
described_class.new(pdf: pdf, title: title, email: user.email).generate
0 commit comments