-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Is your feature request related to a problem? Please describe.
We were recently burned by a scenario where we were calling delete on some models and/or delete_all on some associations and bypassing various callbacks before_destroys etc.
Describe the solution you'd like
I'm thinking it'd be nice to have delete, and delete_all added to the list for https://rails.rubystyle.guide/#beware-skip-model-validations
Describe alternatives you've considered
I could see a distinct rule of preferring destroy and destroy_all over delete/delete_all being a preferred alternative since really it's about before_destroy callbacks (and/or setting updated_at if you use something like acts_as_paranoid) vs hitting the actual model validations
Additional context
Sorry if this is a little thin. Given a bit more time (and assuming it's wanted) I'll take a swing at the alternative option and submit it as a PR.
andyw8
Metadata
Metadata
Assignees
Labels
No labels