barely using moped
This commit is contained in:
parent
3f8b797e9c
commit
380bea3a2f
@ -31,8 +31,8 @@ ref: http://www.mongodb.org/display/DOCS/GridFS+Specification
|
|||||||
|
|
||||||
it has the following features:
|
it has the following features:
|
||||||
|
|
||||||
- implementation is on top of mongoid for portability. moped (the drive)
|
- implementation is on top of mongoid for portability. moped (the driver) is
|
||||||
is barely used
|
barely used
|
||||||
|
|
||||||
- simple, REST-like api
|
- simple, REST-like api
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ class GridFS
|
|||||||
self.default_collection_name = "#{ prefix }.chunks"
|
self.default_collection_name = "#{ prefix }.chunks"
|
||||||
|
|
||||||
field(:n, :type => Integer, :default => 0)
|
field(:n, :type => Integer, :default => 0)
|
||||||
field(:data, :type => Moped::BSON::Binary)
|
field(:data, :type => (defined?(Moped) ? Moped::BSON::Binary : BSON::Binary))
|
||||||
|
|
||||||
belongs_to(:file, :foreign_key => :files_id, :class_name => file_model_name)
|
belongs_to(:file, :foreign_key => :files_id, :class_name => file_model_name)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user