Sha256: 73a18dd168d870946dc4dd416c26a8374a7d849ad366f5d3ac7078afbd9c8ed6
Contents?: true
Size: 497 Bytes
Versions: 18
Compression:
Stored size: 497 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Extensions #:nodoc: module Hash #:nodoc: module CriteriaHelpers #:nodoc: 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 end end end end
Version data entries
18 entries across 18 versions & 3 rubygems