title: How to pass a pdf_file to a parser method in rails?
body: <p>i'm a newbie into rails development and i can't found a solution for that.</p>
  
  <p>I have a model with an attached file (i'm using paperclip) to upload.</p>
  
  <pre><code>has_attached_file :program
  </code></pre>
  
  <p>So, i have a method that receives one of these files and parse it using PDFReader gem.
  I've passed the program object but i'm getting this error:</p>
  
  <pre><code>ArgumentError - input must be an IO-like object or a filename:
  </code></pre>
  
  <p>If i pass <b>program.filename</b> as the parameter i get an error 'undefined method' although that seems that filename method lives into the # object (that appears in the server log)</p>