Mongoid 8 callback

I just ran into this. Between Mongoid 7.x and 8 the order of callbacks has changed in a way that status_changed now returns false. Use saved_change_to_status? instead.

I looked for all after_update and after_save in my code and made it return unless xyz_changed? || saved_change_to_xyz?

1 Like