Reputation: 651
I want to have a model where I need to soft delete a record and not show them in the find or any other conditions while searching.
I want to retain the model without deleting the record. How to go about this?
Thanks
Upvotes: 0
Views: 190
Reputation: 23566
deleted_at
date-time field in DB.Upvotes: 1
Reputation: 61437
Add a deleted
field with a migration and a scope to filter out any deleted records.
Upvotes: 1