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!

Use a Constant for Associations, not class_name

Relying on a class name constant you’ve defined within your application for setting up associations is much better for reliability and refactoring than merely using a string. Read for the implications and implementation: http://blog.nrowegt.com/rails-associations-class-name-best-practice/

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