title: Handling file uploads in Rails 3
body: <p>I had a working code for Rails 2 to handle file uploads that no longer works with Rails 3.
  The code is:</p>
  
  <pre><code># Handling file uploads
  def file=(file_data)
    unless file_data.blank?
      @file_data = file_data
      self.filename = file_data.original_filename
      self.size_before = file_data.size
    end
  end
  </code></pre>
  
  <p>Now Rails 3 doesn't like that, complains with:</p>
  
  <pre><code>undefined method `original_filename' for "MyFile.Ext":String
  </code></pre>
  
  <p>Any solutions that doesn't involve using a file attachment handler (Paperclip, etc)?</p>