title: Issue with attachments in Rails ActionMailer
body: <p>I'm using following code (as in Rails Guides):</p>
  
  <pre><code>def email(file, report_filename, report_type)
      attachments['image.jpg'] = File.read('/Users/admin/Desktop/Codica/fame_and_partners/website/maxresdefault.jpg')
      mail(
        to: 'some_email@gmail.com',
        subject: "Daily orders report #{Date.today.to_date} #{report_type}",
        layout: false
      )
    end
  </code></pre>
  
  <p>When I receive email, I have a file called <code>noname</code> with following content attached instead of my image:</p>
  
  <pre><code>--
  Content-Type: image/jpeg;
   charset=UTF-8;
   filename=image.jpg
  Content-Transfer-Encoding: base64
  Content-Disposition: attachment;
   filename=image.jpg
  Content-ID: &lt;57a9a5c241e82_b9a3fd05c463be4522b9@MacBook-Pro-citrus.local.mail&gt;
  
  /9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUDBAoKCggICgoICAgICAgICAgI
  CAgICAgICAgHCAgICAgIChANCAgOCQcHDSENGhERHx8fBxcYJBgSJBASExIB
  BQUFCAcIDwkJDxQUDxQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU
  FBQUFBQUFBQUFBQUFBQUFBQUFP/AABEIBDgHgAMBIgACEQEDEQH/xAAdAAAB
  BQEBAQEAAAAAAAAAAAADAAECBAUGBwgJ/8QAWxAAAgECAwUFAwcHCAYIBQEJ
  AQIAAxEEEiEFMUFRYQYTInGBMpGhBxRCUrHR8AgjYnKSweEzQ1NUgrLS8RUk
  RHSTohcYNFVjc4PCFiU1ZKOzJjZFhJS04vLT/8QAGwEAAwEBAQEBAAAAAAAA
  AAAAAAECAwQFBgf/xAA/EQACAgEEAAMGBAQEBQMFAQAAAQIRAwQSITETQVEF
  FCJhcZEygaHwUrHB0RUzQuEjYnKC8QZToiQ0krLS4v/aAAwDAQACEQMRAD8A
  0agt1ipDiZFqgMGak+nPmjRo8zu5QveX00tM3vQJOjWF4qA0VYcrx6tXlYQA
  ...
  --
  </code></pre>
  
  <p>I'm using Rails 3.2.2.22. How to fix this issue?</p>