Sha256: 75f2396ce726683d69027748eeed925fa555abb3fc7f64e9680899a1a0400597
Contents?: true
Size: 432 Bytes
Versions: 3
Compression:
Stored size: 432 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Criterion #:nodoc: # Complex criterion are used when performing operations on symbols to get # get a shorthand syntax for where clauses. # # Example: # # <tt>{ :field => { "$lt" => "value" } }</tt> # becomes: # <tt> { :field.lt => "value }</tt> class Complex def to_mongo_query v {"$#{operator}" => v} end end end end
Version data entries
3 entries across 3 versions & 1 rubygems