I have use case to delete the soft deleted document after a period. So, I fetched the deleted document and used destroy! but it did not work. I had to restore that document and destroy! which is weird.
Then, I tried delete! instead of destroy! which worked. I would have expected same behavior here.
p = Person.new()
p.destroy
p.destroyed?
# > true
# permanently delete - did not work
p.destroy!
# > nil
# permanently delete - worked!!
p.delete!
# > true
I have use case to delete the soft deleted document after a period. So, I fetched the deleted document and used destroy! but it did not work. I had to restore that document and destroy! which is weird.
Then, I tried delete! instead of destroy! which worked. I would have expected same behavior here.