We started a project using Mongoid recently and since we're early in
development I figured I'd just get used to using 3.x. I installed the RC
the other day and after a little bit of refactoring noticed that most
things were working well (I gotta say, I'm very happy with custom data
types now).
With that said, here is a piece of code that used to word and doesn't now:
Model.all.delete
This works: Model.delete_all
That was acceptable. Here's the problem though, Model.all.delete produces
this in my log:
MOPED: localhost:27017 COMMAND database=db_name
command={:count=>:events, :query=>{}} (0.0ms)
MOPED: localhost:27017 DELETE database= db_name collection=models
selector={"$query"=>{}, "$orderby"=>{"_id"=>1}} flags=[] (0.0ms)
It seems like it SHOULD be deleting. Just the same, the following example
from the new docs: Band.where(name: "Photek").update(label: "Mute")
Doesn't seem to work. Maybe I'm missing something in the new setup, but I
cannot seem to do mass updates of any sort.