Ruby on Rails => Implement your own soft delete with the following features:
Should cascade delete
Should be able to permanent delete with a different method. We should have a method to soft and hard delete records.
Remember that the soft delete and hard delete should take care of dependent: :destroy associations as well. Also write tests for these.
Important: Do not use any gems for soft delete feature.?
One of the interesting solutions you can try: