Module: Mongoid::Criteria::Queryable::Extensions::Symbol::ClassMethods
Relationships & Source Files | |
Defined in: | lib/mongoid/criteria/queryable/extensions/symbol.rb |
Instance Method Summary
-
#add_key(name, strategy, operator, additional = nil, &block)
Adds a method on symbol as a convenience for the MongoDB operator.
-
#evolve(object) ⇒ Symbol
Evolves the symbol into a MongoDB friendly value - in this case a symbol.
Instance Method Details
#add_key(name, strategy, operator, additional = nil, &block)
Adds a method on symbol as a convenience for the MongoDB operator.
#evolve(object) ⇒ Symbol
Evolves the symbol into a MongoDB friendly value - in this case a symbol.
# File 'lib/mongoid/criteria/queryable/extensions/symbol.rb', line 52
def evolve(object) __evolve__(object) do |obj| obj.try(:to_sym) end end