123456789_123456789_123456789_123456789_123456789_

Module: Mongoid::Extensions::Symbol

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/mongoid/extensions/symbol.rb

Overview

Adds type-casting behavior to Symbol class.

Instance Attribute Summary

Instance Attribute Details

#mongoid_id?true | false (readonly)

Deprecated.

Is the symbol a valid value for a ::Mongoid id?

Examples:

Is the string an id value?

:_id.mongoid_id?

Returns:

  • (true | false)

    If the symbol is :id or :_id.

[ GitHub ]

  
# File 'lib/mongoid/extensions/symbol.rb', line 17

def mongoid_id?
  to_s.mongoid_id?
end