Module: Paperclip::Helpers

Defined in:
lib/neo4j_paperclip.rb

Instance Method Summary collapse

Instance Method Details

#each_instance_with_attachment(klass, name) ⇒ Object



12
13
14
15
16
# File 'lib/neo4j_paperclip.rb', line 12

def each_instance_with_attachment(klass, name)
  class_for(klass).unscoped.where("#{name}_file_name".to_sym.ne => nil).each do |instance|
    yield(instance)
  end
end