lib/paperclip/helpers.rb
# Find all instances of the given Active Record model +klass+ with attachment +name+.
# This method is used by the refresh rake tasks.
Find all instances of the given Active Record model +klass+ with attachment +name+.
This method is used by the refresh rake tasks.
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.where("#{name}_file_name IS NOT NULL").find_each do |instance|
        yield(instance)
      end
    end
def each_instance_with_attachment ( klass , name ) class_for ( klass ) . unscoped . where ( "#{name}_file_name IS NOT NULL" ) . find_each do | instance | yield ( instance ) end end
Find all instances of the given Active Record model +klass+ with attachment +name+.
Find all instances of the given Active Record model + klass + with attachment + name + .
klass
<not_specific>
name
<not_specific>