Reserved words in Rails
Oh the agony… I just spent half a day agonising over a new model that I created, and didn’t work when I was doing a find for a record. Just because one of the column name is a named after a reserved word! The error was an obscure:
SyntaxError: compile error
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/base.rb:1359: syntax error, unexpected tINTEGER
So I dedicate this blog entry to the listing of reserved words in Rails. If anyone else has come across any other reserved words that gave you hell, please comment!
Reserved words for Rails’ ActiveRecord
Reserved words for Rails’ ActiveController
- template ( Someone mentioned this on the Internet. I didn’t test this out )
Some people have pointed me to these links. They are more comprehensive!