Because of the recent changes with update_attribute/update_column, the process of deleting an object with a has_one :foo, :dependent => :nullify causes callbacks to be triggered on Foo. Either the documentation needs to be updated (which states that it won't trigger callbacks) or the behavior needs to be fixed.
/cc @tenderlove @jonleighton
I don't think a nullify should trigger callbacks. @rafaelfranca can you chip in? was this intentional?
Also, is this a 4.0 issue or a 3.2 issue as well?
I didn't changed the behaviour. I only reverted the changes.
It is this way since at least Rails 3.1 https://github.com/rails/rails/blob/3-1-stable/activerecord/lib/active_record/associations/has_one_association.rb#L39
If we are going to change the behaviour we need to document it.
And I think it should trigger callbacks, since the object was updated and we need to change the value of updated_at.
Ok, thanks. I'm not sure either way but I don't think it's worth changing if it's always been like this. Closing.