3 ms·
I'm not actually a fan of ActiveRecord, i kind of detest it actually. But it's the beating heart of rails. The ORM aspect is almost a distraction from its prima
by ForTheKidz 2y ago
I'm not actually a fan of ActiveRecord, i kind of detest it actually. But it's the beating heart of rails. The ORM aspect is almost a distraction from its primary benefit, defining a globally referencable model with lifecycle hooks and monkey-patching. Basically everything else falls apart without the model to leverage to rapidly produce code. The add-on packages you reference work so well because there are so many ways to hook into activerecord (and to a lesser extent, routing etc).
Like, the typical path is: 1) add gem, 2) code gen, 3) run migration, 4) you now have third party code managing a subset of your model. Crazy powerful pattern. applies to everything from auth to sending emails to async task workers to writing audit logs.