Associated objects are promising

Garrett Dimon, Organizing Rails Code with ActiveRecord Associated Objects:

At the simplest level, associated objects come in handy mostly by helping organize and compartmentalize related logic so we can better avoid the junk drawer or God object “patterns.” But that’s an over-simplification because the benefits can be almost invisible–it just disappears into the background and does its job.

Associated objects have an excellent effort-to-benefit ratio. The implementation is less than a few hundred lines of code. The docs, which fit entirely in the readme, may outweigh the actual code! From that, you get a multipurpose and surprisingly deep tool for designing and modeling your system.

I’m excited to tinker more with this one.

Adam Keys @therealadam