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.
69 70 71 |
# File 'lib/mongo_record/core_ext.rb', line 69 def to_oid BSON::ObjectID.legal?(self) ? BSON::ObjectID.from_string(self) : self end |