Module: Mongoid::Compatibility::ObjectId

Defined in:
lib/mongoid/compatibility/object_id.rb

Class Method Summary collapse

Class Method Details

.legal?(value) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/mongoid/compatibility/object_id.rb', line 6

def self.legal?(value)
  Mongoid::Compatibility::Version.mongoid3? ? Moped::BSON::ObjectId.legal?(value) : BSON::ObjectId.legal?(value)
end