Brilliant addition to Rails: 'touch' in ActiveRecord

Today marks the glorious day of another brilliant addition to ActiveRecord. ‘touch’ is now an option for both individual records and associations. By touching an object, its updated_at attribute is set to the current time.

While pretty cool for one record, the hidden power lies in associations. Now, you can have any parent object ‘touch itself’ when a child is updated by setting touch to true on the association. I have always wondered if that were done automatically. This commit shows it hadn’t, until now. Shoulda been since 1.0, really and I am glad it’s in now.