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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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