RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

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

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in