Re:Ways to Decompose Fat ActiveRecord Models
by ollysb on Wednesday October 17, 2012 @11:11AM
(#4664767)
I try to follow a gradual approach to decomposition. When I start to get a lot of related methods I wrap them in a module, but still within the model definition(I just include the module immediately after definition). From there I might just move it to a separate file as is or perhaps I turn into a decorator and add an accessor for it on the model e.g.
The biggest danger with any of the patterns from the article is that you start using them before you actually need them. Then you just end up with a lot of complexity for no benefit.
[ Parent
| on HN ]