Module: Mongoid::TagCollectible
- Defined in:
- lib/mongoid-tag-collectible/tag.rb,
lib/mongoid-tag-collectible/tagged.rb,
lib/mongoid-tag-collectible/mongoid.rb,
lib/mongoid-tag-collectible/version.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.2.0'
Class Method Summary collapse
Class Method Details
.mongoid3? ⇒ Boolean
3 4 5 |
# File 'lib/mongoid-tag-collectible/mongoid.rb', line 3 def self.mongoid3? Mongoid::VERSION =~ /^3\./ end |
.mongoid4? ⇒ Boolean
7 8 9 |
# File 'lib/mongoid-tag-collectible/mongoid.rb', line 7 def self.mongoid4? Mongoid::VERSION =~ /^4\./ end |
.object_id?(value) ⇒ Boolean
11 12 13 |
# File 'lib/mongoid-tag-collectible/mongoid.rb', line 11 def self.object_id?(value) self.mongoid3? ? Moped::BSON::ObjectId.legal?(value) : BSON::ObjectId.legal?(value) end |