Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/pdfs/header_pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ def header_spacing
end

def header_current_date
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
end
end
2 changes: 1 addition & 1 deletion spec/pdfs/header_pdf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
it "generates a header with the correct content" do
user = create(:user)
pdf = Prawn::Document.new
date = "Data: #{Time.zone.now.strftime('%d/%m/%Y')}"
date = Time.zone.now.strftime("%d/%m/%Y")
title = "Procedimentos"

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