Class: Uorm::Attributes::Type::ObjectId

Inherits:
Object
  • Object
show all
Defined in:
lib/uorm/mongo/object_id.rb

Class Method Summary collapse

Class Method Details

.as_json(value) ⇒ Object



10
11
12
# File 'lib/uorm/mongo/object_id.rb', line 10

def as_json value
  value.to_s
end

.convert(value) ⇒ Object



6
7
8
# File 'lib/uorm/mongo/object_id.rb', line 6

def convert value
  ::BSON::ObjectId value.to_s
end