Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permanently deleting soft deleted document #76

Open
rvyas opened this issue Sep 13, 2024 · 0 comments
Open

permanently deleting soft deleted document #76

rvyas opened this issue Sep 13, 2024 · 0 comments

Comments

@rvyas
Copy link

rvyas commented Sep 13, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant