Class: Mongoid::Boolean

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid/extensions/boolean.rb

Class Method Summary collapse

Class Method Details

.mongoize(object) ⇒ String

Turn the object from the ruby type we deal with to a Mongo friendly type.

Examples:

Mongoize the object.

Boolean.mongoize("123.11")

Returns:

  • (String)

    The object mongoized.

Since:

  • 3.0.0



16
17
18
# File 'lib/mongoid/extensions/boolean.rb', line 16

def mongoize(object)
  ::Boolean.evolve(object)
end