Hip RoR Tip: Don’t name a field ‘type’

The field name type is a dangerous name for a field.

The ‘type’ method in Ruby became deprecated.

It is also considered a “Magic Field” name. Specifically, it is used for Single Table Inheritance.

So save 15 minutes of your life by considering the field names for the objects in your database. 🙂

This entry was posted in General. Bookmark the permalink.