-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
DRY paranoia and discard inclusion into models #3555
Conversation
Cool, I think we still have some occurrences of the newly deprecated methods, can you take a look at failing specs? 🙏 |
Ah, I missed that paranoia itself is also using (see here) the newly deprecated scopes ( |
Extract soft delete gems (paranoia and discard) inclusion from models into a reusable concern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 💪
Paranoia is being replaced with Discard. This deprecates with_deleted and only_deleted Paranoia' scopes. This also refactors/remove unnecessary #really_destroy! paranoia method calls which depend on with_deleted scope, hence raises deprecation warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks, Dumi!
@cedum this should now be good to merge. 🙂 |
This PR DRYs the soft delete inclusion logic into a reusable concern.
This also deprecates
.with_deleted
and.only_deleted
Paranoia' scopes, which will be removed in Solidus v3.This has been extracted from the #3488 PR. After some feedback, I'm extracting the non-breaking bits into separate PRs, so we can merge them without having to wait for Solidus v3.
Once merged, I'll rebase and revisit #3488 to definitely remove Paranoia as a dependency from Solidus v3.
Checklist: