Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Home

manuelmeurer edited this page · 5 revisions
Clone this wiki locally

Welcome to the mongoid-paperclip wiki!

rake paperclip:refresh:missing_styles

just thought I can leave it here

module Paperclip
  module Helpers

    # Find all instances of the given Active Record model +klass+ with attachment +name+.
    # This method is used by the refresh rake tasks.
    def each_instance_with_attachment(klass, name)
      class_for(klass).unscoped.ne("#{name}_file_name" => nil).each do |instance|
        yield(instance)
      end
    end

  end
end
Something went wrong with that request. Please try again.