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!

The biggest Rails code smell you should avoid to keep your app healthy

I’ve chosen the biggest (IMO) Rails code smell I encounter very often and described why it’s bad and how to fix it.

Comments

I often disagree with what some people call “code smells” but not in this case.

Callbacks are like random landmines which make code written by the unwary blow up. Even those who write them can forget, and their code blows up too.

And the longer they’re there, the worse they smell.

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