title: deleting multiple files (versions) with Fog and Carrierwave - Rackspace
body: <p>I am building an application where i have a file with original, medium and thumbnail size images. I am using carrierwave to accomplish this, and I need to remove all versions of the file from Rackspace Cloud Files:</p>
  
  <pre><code>class StyleImageUploader &lt; CarrierWave::Uploader::Base
    version :medium do
        process :resize_to_limit =&gt; [460, 460]
    end
  
    version :thumb do
        process :resize_to_limit =&gt; [100, 100]
    end
  
    def filename
        "#{Digest::MD5.hexdigest(original_filename . Time.now.to_s)}.#{file.extension}" if original_filename
    end
  end
  </code></pre>
  
  <p>However, when i do a destroy through console, it is only removing the original version... How do i go about deleting all the versions? I also get this error in console, but it still does remove the single file</p>
  
  <pre><code>#&lt;Fog::Storage::Rackspace::NotFound: Fog::Storage::Rackspace::NotFound&gt;
  </code></pre>
  
  <p>Controller destroy method:</p>
  
  <pre><code>class ImagesController &lt; ApplicationController
    def destroy
      @image = Image.find(params[:id])
      @image.destroy
      render :json =&gt; true
    end
  end
  </code></pre>