mongoid/mongoid — Issue #1519: Disabling observers not working
Author: fphilipe
Created: 2011-12-22 13:05:25+00:00
State: open

Disabling observers on a model with `Model.observers.disable(:all)` does not work.

`Mongoid::Observer` should use the `update` method instead of `send` in [lib/mongoid/observer.rb](https://github.com/fphilipe/mongoid/blob/master/lib/mongoid/observer.rb#L162) in order to implement support for turning observers off.

Definition of `update`: https://github.com/rails/rails/blob/master/activemodel/lib/active_model/observing.rb#L228

`update` calls `send` unless the observer was explicitly disabled.