title: Rails, Prawn - PDF show up in browser & etc
body: <p>I'm trying to understand the Prawn pdf gem.</p>
  
  <p>I was able to make it generate a pdf. Every gem in the gemfile included:</p>
  
  <pre><code>gem 'mysql', '~&gt; 2.8.1'
  gem 'prawn', '~&gt; 0.12.0'
  gem 'pdf-reader', '~&gt; 0.10.0'
  gem 'Ascii85', '~&gt; 1.0.1'
  </code></pre>
  
  <p>In the config/application.rb:</p>
  
  <pre><code>config.autoload_paths &lt;&lt; "#{Rails.root}/app/reports"
  </code></pre>
  
  <p>Then in the controller:</p>
  
  <pre><code> require 'prawn'
  
   def index
    pdf = Prawn::Document.new
    pdf.text "Hello World"
    pdf.render_file "x.pdf"
   end
  </code></pre>
  
  <p>Than I call the index function. A PDF named x.pdf is created in the root of my application. Amongst the gemfile, rakefile and config.ru. </p>
  
  <p>Question:</p>
  
  <ol>
  <li>How can I force prawn to generate the file in the app/report (or any other selected) folder?</li>
  <li>How can I make the action to generate the file in the browser window and don't save it?</li>
  <li>How can I make it to save and show up in the browser window?</li>
  </ol>