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

Handle #delete_all #566

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

mohammednasser-32
Copy link
Contributor

@mohammednasser-32 mohammednasser-32 commented Sep 24, 2024

Goal

Add support for delete_all method, taking into account that delete_all can be called on both Class and ActiveRecord::Relation, example:

User.delete_all
User.where(id: [1,2,3]).delete_all

The feature is wrapped by a setting that can be enabled globally using

Paranoia.delete_all_enabled = true

Or for specific models

acts_as_paranoid(delete_all_enabled: true)

Fixes Issue#565
Fixes Issue#538

@mathieujobin mathieujobin merged commit ba6dde7 into rubysherpas:core Oct 2, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants