Module: Mongoid::Extensions::Hash::CriteriaHelpers
- Included in:
- Hash
- Defined in:
- lib/mongoid/extensions/hash/criteria_helpers.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#expand_complex_criteria ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/mongoid/extensions/hash/criteria_helpers.rb', line 6 def hsh = {} self.each_pair do |k,v| if k.class == Mongoid::ComplexCriterion hsh[k.key] = {"$#{k.operator}" => v} else hsh[k] = v end end hsh end |