I work at a company where we have a pretty monolithic rails app that isn’t particularly well written. As a result we have callbacks scattered across many files that have widely assorted impacts. One issue that I’ve run across multiple times is trying to skip callbacks (all callbacks) when saving objects (things like sanitizing your db in a rake task?).
I do know about update_column and update_all, I’m just wondering about the potential for a flag that could be set on an instance, (maybe even class level?) and perfectly skips every single call back.
task.skip_all_callbacks task.save! => true
Please let me know if there’s any interest in this idea or if it’s just plain stupid.