Module: MongoStash::ClassMethods

Defined in:
lib/mongo_stash.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#gridfsObject

Returns the value of attribute gridfs.



14
15
16
# File 'lib/mongo_stash.rb', line 14

def gridfs
  @gridfs
end

Instance Method Details

#all_after_stashObject



15
16
17
18
19
20
21
22
# File 'lib/mongo_stash.rb', line 15

def all_after_stash
  self.collection.find.each do |i|
    self.schema.each do |k,v|
      obj = self.new(i)
      obj.after_stash(k) if v[:type]==:attachment&&obj[k].to_s!=''
    end
  end
end