title: Save image from URL by paperclip using http basic authentication
body: <p>How can i save an image from an URL which is authenticated using http basic authentication, using paperclip?</p>
  
  <p>I imagine the solution something like this:</p>
  
  <pre><code>require "open-uri"
  
  class User &lt; ActiveRecord::Base
    has_attached_file :picture
  
    def picture_from_url(url)
      self.picture = open(url)
    end
  end
  </code></pre>
  
  <p>But i need to put the credentials. How can i solve this?</p>
  
  <p>Thanks</p>