Skip to content

permanently deleting soft deleted document #76

Description

@rvyas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions