Migrating from acts_as_paranoid to paranoia gem

812 Views Asked by At

We have used acts_as_paranoid gem(https://github.com/ActsAsParanoid/acts_as_paranoid) for soft deletion in our project. The project is in live now. Faced some of the issues in this gem and planned to migrate to paranoia gem(https://github.com/rubysherpas/paranoia). Is there anything we need to consider while migrating?

1

There are 1 best solutions below

0
On

I would recommend taking a look at Discard

https://github.com/jhawthorn/discard#why-not-paranoia-or-acts_as_paranoid

It accomplishes a similar goal without overriding activerecord's method by taking a simpler approach of providing convenience methods to hide soft-deleted records. There is a section on the documentation about why the author thiks this is better than either acts-as-paranoid or paranoia.