title: Attaching remote URL file as attachment in action mailer
body: <p>I have an ActionMailer setup to send an email with an attachment from S3.  I'm doing so like this:</p>
  
  <pre><code>def job_apply(current_tenant, applicant)
     @current_tenant = current_tenant
     @applicant = applicant
  
     file = open(applicant.resume.url).read
     attachments[applicant.resume] = file
  
     email_with_name = "#{@current_tenant.name} &lt;#{@current_tenant.help_email}&gt;"
     mail(from: email_with_name, to: applicant.job.apply_email, subject: "New Job Application")
   end
  </code></pre>
  
  <p>The applicant.resume.url returns a correct URL which I can open up in the browser and retrieve the file with, however I am getting the following error:</p>
  
  <pre><code>Message undefined method `ascii_only?' for #&lt;ApplicantResumeUploader:0x007fe6bc5c28a8&gt;
  File    /Users/cmalpeli/.rvm/gems/ruby-1.9.3-p194@job_board/gems/mail-2.4.4/lib/mail/encodings.rb
  Line    103
  </code></pre>
  
  <p>This is the code in encodings.rb:</p>
  
  <pre><code> 98     def Encodings.decode_encode(str, output_type)
   99       case
   100       when output_type == :decode
   101         Encodings.value_decode(str)
   102       else
   103         if str.ascii_only?
   104           str
   105         else
   106           Encodings.b_value_encode(str, find_encoding(str))
   107         end
   108       end
  </code></pre>
  
  <p>I'm at a bit of a loss as to where to go from here...</p>
  
  <p>Any help would be appreciated...</p>