From 92d7fe73aecd96133cca27791e86f1280ec7544e Mon Sep 17 00:00:00 2001 From: sagarpreet-chadha Date: Mon, 2 Oct 2017 00:08:47 +0530 Subject: [PATCH] issue fixed for downloading PDF if Venue not given --- app/pdfs/ticket_pdf.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/pdfs/ticket_pdf.rb b/app/pdfs/ticket_pdf.rb index ecb4cd2c..3a2fcfca 100644 --- a/app/pdfs/ticket_pdf.rb +++ b/app/pdfs/ticket_pdf.rb @@ -51,7 +51,9 @@ class TicketPdf < Prawn::Document move_down 70 draw_text @conference.title.to_s, at: [@mid_horizontal + 30, cursor - 30], size: 12 draw_text @conference.organization.name.to_s, at: [@mid_horizontal + 30, cursor - 50], size: 12 + if @conference.venue != nil draw_text @conference.venue.name.to_s, at: [@mid_horizontal + 30, cursor - 70] + end move_up 130 move_down @mid_vertical end