app/models/job/order_processor.rb in artfully_ose-1.2.0.alpha.2 vs app/models/job/order_processor.rb in artfully_ose-1.2.0.beta.1
- old
+ new
@@ -83,11 +83,12 @@
PassMailer.pass_info_for(self.order.person, self.order.organization.email,self.order.passes.collect(&:product)).deliver
end
end
def generate_pdf
- pdf_generator = PdfGeneration.new(order)
- download_url = pdf_generator.generate
- order.pdf = URI.parse(download_url)
+ pdf = PdfGeneration.new(order).generate
+ file = Tempfile.new(["#{order.id}", '.pdf'])
+ file << pdf.force_encoding("UTF-8")
+ order.pdf = file
order.save
end
end