Reserved Words You Can’t Use

Other Names Reported to Have Caused Trouble

singular names finishing in “s”: Axis → Axes, Access → Accesses, will break the pluralization in rake: Axi, Acces Names You Can’t Use from SQL

The list of reserved words is dependent on the database you use, for portability reasons it would be wise to not chose a field name listed in any of these tables:

If you aren’t sure, you can check the word against the SQL Reserved Words Checker

Also note that numerous field names have special properties. See the full list of MagicFieldNames. Typical Errors

The errors that occur when you use a reserved word tend to be very confusing. Things that you think are happening in your code, are actually happening somewhere in the framework. Sometimes you can look at the stack trace and see that its not going through your class, but through some framework class. If you have an error that makes no sense at all, I would check to make sure you don’t have a name that conflicts with the above list.

In one instance I got a mysql error when I tried to save a model that belongs_to :quote. The belongs_to made a method that overrode the quote method in activerecord::base, which caused Quote objects to be returned where activerecord was expecting a quoted string! Requests