Module: MongoMapper::Extensions::ObjectId

Included in:
ObjectId
Defined in:
lib/mongo_mapper/extensions/object_id.rb

Instance Method Summary collapse

Instance Method Details

#from_mongo(value) ⇒ Object



9
10
11
# File 'lib/mongo_mapper/extensions/object_id.rb', line 9

def from_mongo(value)
  value
end

#to_mongo(value) ⇒ Object



5
6
7
# File 'lib/mongo_mapper/extensions/object_id.rb', line 5

def to_mongo(value)
  Plucky.to_object_id(value)
end