We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3546f75 commit ba63fc8Copy full SHA for ba63fc8
source/tutorials/mongoid-queries.txt
@@ -478,6 +478,14 @@ an ``{'$and' => [{'$nor' => ...}]}`` construct:
478
# Complex conditions
479
Band.where(name: /Best/).not(name: 'Astral Projection').selector
480
# => {"name"=>/Best/, "$and"=>[{"$nor"=>[{"name"=>"Astral Projection"}]}]}
481
+
482
+ # Symbol operator syntax
483
+ Band.not(:name.ne => 'Astral Projection')
484
+ # => #<Mongoid::Criteria
485
+ # selector: {"$and"=>[{"$nor"=>[{"name"=>{"$ne"=>"Astral Projection"}}]}]}
486
+ # options: {}
487
+ # class: Band
488
+ # embedded: false>
489
490
If using ``not`` with arrays or regular expressions, please note the
491
caveats/limitations of ``$not`` `stated in the MongoDB server documentation
0 commit comments