Class: Object

Inherits:
BasicObject
Defined in:
lib/mongo_record/convert.rb

Overview

Mongo stores trees of JSON-like documents. These to_mongo_value methods covert objects to Hash values, which are converted by the Mongo driver to the proper types.

Instance Method Summary collapse

Instance Method Details

#to_mongo_valueObject

Convert an Object to a Mongo value. Used by MongoRecord::Base when saving data to Mongo.



24
25
26
# File 'lib/mongo_record/convert.rb', line 24

def to_mongo_value
  self
end