Class: String
Instance Method Summary collapse
-
#to_oid ⇒ Object
Convert this String to an ObjectID.
Instance Method Details
#to_oid ⇒ Object
Convert this String to an ObjectID.
24 25 26 |
# File 'lib/mongo_record/base.rb', line 24 def to_oid Mongo::ObjectID.legal?(self) ? Mongo::ObjectID.from_string(self) : self end |