mongoid/mongoid — Issue #1453: Model.destroy does not follow ActiveModel /AR behavior
Author: gucki
Created: 2011-11-27 19:49:07+00:00
State: open

After calling #destroy on a record #new_record? returns true. This is invalid and causes problems, for example when using with rails' dom_id helper.

The correct behavior would be (according to https://github.com/rails/rails/blob/master/activerecord/lib/active_record/persistence.rb):

record.destroy

record.destroyed? -> true
record.new_record? -> false
record.persisted? -> false