I\'m trying to understand the Prawn pdf gem.
I was able to make it generate a pdf. Every gem in the gemfile included:
gem \'mysql\', \'~> 2.8.1\'
Answering Question 3: "How can I make it to save and show up in the browser window?"
def index
pdf = Prawn::Document.new
pdf.text 'Hello World'
send_data pdf.render, filename: 'x.pdf', type: 'application/pdf', disposition: 'inline'
end
disposition: 'inline' will force the browser ( if it can ) to display your PDF inside the current browser window