Module: Moped::GridFS::Bucketable

Included in:
Bucket, File, Files
Defined in:
lib/moped/gridfs/bucketable.rb

Instance Method Summary collapse

Instance Method Details

#chunks_collectionObject



12
13
14
15
16
17
18
# File 'lib/moped/gridfs/bucketable.rb', line 12

def chunks_collection
  if self.respond_to?(:session)
    session[:"#{name}.chunks"]
  else
    bucket.chunks_collection
  end
end

#files_collectionObject



4
5
6
7
8
9
10
# File 'lib/moped/gridfs/bucketable.rb', line 4

def files_collection
  if self.respond_to?(:session)
    session[:"#{name}.files"]
  else
    bucket.files_collection
  end
end