My Rails Models Are Bloated. Should I Use Concerns?
This is a question that I’ve seen asked a couple of times: My Rails Models Are Bloated. Should I Use Concerns?
When you’re making a traditional “fat model” kind of Rails app, the model classes tend to keep growing with every new feature. If, at some point, you decide they are too big and need to be refactored, you might be tempted to use ActiveSupport::Concern. In this post, I want to advise that concerns are probably a bad choice for slimming down model classes, and suggest some alternatives.
Comments
Hey, Tom, could you please change the title to something more meaningful? Thanks!
Whoops! I meant to paste in the title but got the URL instead.
Post a comment