2 ms·
I love DHH but passages like this "concern" me (lol): > Here’s a Dropboxed concern that we mix into just the Person model Right. So extracting a section of co
by venus 14y ago
I love DHH but passages like this "concern" me (lol):
> Here’s a Dropboxed concern that we mix into just the Person model
Right. So extracting a section of code into a mixin .. and then mixing it into a single model? That's just moving the code elsewhere and using a fancy method to inject it back in! It's not cleaning up anything!
For anyone interested in practical techniques to rethink, refactor and really take the knife to your overweight models this post is a good start: http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/ http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decomp...