Sha256: 86b9cd247d331f0fc0af1b8bd8e7ebdc59213da41d2b4671bfd788ec40584fcb
Contents?: true
Size: 451 Bytes
Versions: 23
Compression:
Stored size: 451 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Extensions #:nodoc: module Hash #:nodoc: module CriteriaHelpers #:nodoc: def expand_complex_criteria 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 end end end end
Version data entries
23 entries across 23 versions & 1 rubygems