Sha256: 42a4e821919234efdc496cac546f1c901dd204c457ea6c2a90d0405cdd7091bc
Contents?: true
Size: 438 Bytes
Versions: 19
Compression:
Stored size: 438 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
19 entries across 19 versions & 3 rubygems