:nodoc:
6 7 8 9 10 11 12 13 14 15 16 17 18
# File 'lib/mongoid/extensions/hash/criteria_helpers.rb', line 6 def expand_complex_criteria hsh = {} each_pair do |k,v| case k when Mongoid::Criterion::Complex hsh[k.key] ||= {} hsh[k.key].merge!({"$#{k.operator}" => v}) else hsh[k] = v end end hsh end