Upgrades for ActiveRecord

Ryan has been writing about what's new in ActiveRecord. I love these new additions to the framework. The ability to track modified properties out of the box has been necessary for a while, and though I'm a fan of acts_as_audited, these changes will essentially obviate it and replace it with a before_save hook (don't forget your transactions!).

I'm excited to see the partial- (and no-) update support as well. This should save tons of unnecessary write operations on unmodified objects. I've never been too concerned about the need for eliminating unchanged columns from a write operation, as long as there were some modifications, as we tend not to create objects so big or tables so wide that the performance gain is obvious. The suppression of completely unnecessary writes, though, is huge. I'm glad to see the changes made to the framework, though, because these are real performance gains, essentially for free if you move up to edge.

Get In Touch