Sha256: e8294697d0506030ed3b0dd3f3fd9ea5ced0dbc99fc045758db2704c3f39db69
Contents?: true
Size: 570 Bytes
Versions: 8
Compression:
Stored size: 570 Bytes
Contents
# Model for storing portion of bytes from particular Neofiles::File. Has only two fields: the bytes string #data # and sequence number #n # class Neofiles::FileChunk include Mongoid::Document store_in collection: Rails.application.config.neofiles.mongo_chunks_collection, client: Rails.application.config.neofiles.mongo_client belongs_to :file, class_name: 'Neofiles::File' field :n, type: Integer, default: 0 # что это за поле? field :data, type: BSON::Binary index({file_id: 1, n: 1}, background: true) def to_s data.data end end
Version data entries
8 entries across 8 versions & 1 rubygems