jnunemaker/plucky — Issue #19: $nor is treated as a key, not as a query option 
Author: milaniliev
Created: 2011-12-22 17:49:23+00:00
State: open

When passing a $nor query, MongoMapper (up to 0.10.1) appears to incorrectly add an $in around the $nor's options array, as if it were a key.

$or:

```ruby
Post.where(:$or => [{:publish_at => 1}, {:publish_at => 2}])
=> #1}, {:publish_at=>2}]...>
```

$nor:

```ruby
Post.where(:$nor => [{:publish_at => 1}, {:publish_at => 2}])
=> #[{:publish_at=>1}, {:publish_at=>2}]}...>
```

From brief investigation, it looks like $nor should be added to $or and $and here:

https://github.com/jnunemaker/plucky/blob/master/lib/plucky/criteria_hash.rb#L123

Thanks !
Milan Iliev