barely using moped

This commit is contained in:
ahoward 2012-07-23 00:34:29 -06:00
parent 3f8b797e9c
commit 380bea3a2f
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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)