title: how to render the pdf file to browser in rails?
body: <p>I have a <code>pdf document</code> in my <code>rails</code> application. i want to <code>render</code> this <code>pdf page</code> to the <code>browser</code>(not the downloading). i tried the following <code>code</code> but its not working, seems like the <code>hyperlink</code> is not making the request as <code>pdf</code> request. here is the <code>code</code>.</p>
  
  <pre><code>def read_more
      format.pdf do
      render :pdf =&gt; "/home/john/Downloads/read_more.pdf"
      end
  end
  </code></pre>
  
  <p>and the link wchich makes apdf request is like this</p>
  
  <pre><code>&lt;%= link_to 'Invoice', read_more_path, :format =&gt; :pdf %&gt;
  </code></pre>