mongoid/mongoid — Issue #1658: update_attribute on non-changed attr triggers observer after_save
Author: jbrown
Created: 2012-01-30 17:59:31+00:00
State: open

I've got some code like this that runs on a schedule.

```ruby
`ping -c 1 -W 1 #{stack.ip}`
stack.update_attribute :online, $?.success?
```

If the value of the `online` attribute hasn't changed, nothing is saved to the database. This is the [documented behavior](http://mongoid.org/docs/persistence/standard.html#update_attribute) and what I would expect. However, the `after_save` callback is still triggered in my observer even though no save operation technically occurred. Is this the correct behavior?