title: Getting correct path/url from Paperclip Gem during after_post_process callback?
body: <p>I have a fairly standard Paperclip setup, it's almost straight out of the readme. I have a simple method triggered via callback to get the primary colors out of an uploaded image, and save them to the corresponding instance. </p>
  
  <pre><code>class Image &lt; ActiveRecord::Base
      has_attached_file :file, :styles =&gt; { large: "800x&gt;", :medium =&gt; "300x300&gt;", :thumb =&gt; "100x100&gt;" }, :default_url =&gt; "/images/:style/missing.png"
      validates_attachment_content_type :file, :content_type =&gt; /\Aimage\/.*\Z/
  
      after_post_process :get_colors
  
      def get_colors
        colors = Miro::DominantColors.new(self.file.url)
        colors = colors.to_hex.join(',')
        self.colors = colors
        self.save       
      end
  end
  </code></pre>
  
  <p>As you can see, I have an <code>after_post_process</code> callback, and it does get triggered. The trouble is that when I call <code>self.file.url</code> I get a path that looks like this:</p>
  
  <p><code>"/system/images/files//original/Peterson-Products-Wireframe-v01.jpg?1398443345"</code>. </p>
  
  <p>It's missing the <code>:id_partion</code> portion. It's real path should look more like:</p>
  
  <p><code>"/system/images/files/000/000/033/original/Peterson-Products-Wireframe-v01.jpg?1398443345"</code></p>
  
  <p>Should I be using some other callback? I only want this triggered once per upload... Never again if the image is updated. Is this a bug in paperclip that I should be filing on Github?</p>
  
  <ul>
  <li>Rails Version 4.1 </li>
  <li>Paperclip Version 4.1</li>
  <li>Ruby 2.1.0</li>
  </ul>
  
  <p>Thanks so much!</p>