diff --git a/app/pdfs/header_pdf.rb b/app/pdfs/header_pdf.rb index a74f909..d28e82f 100644 --- a/app/pdfs/header_pdf.rb +++ b/app/pdfs/header_pdf.rb @@ -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 diff --git a/spec/pdfs/header_pdf_spec.rb b/spec/pdfs/header_pdf_spec.rb index e398eb3..8d23332 100644 --- a/spec/pdfs/header_pdf_spec.rb +++ b/spec/pdfs/header_pdf_spec.rb @@ -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