Tag Archives: activerecords

Index your tables people.

A good read on table index. http://www.railway.at/articles/2008/04/24/database-agnostic-database-ignorant Sometimes, it is easy to forget when someone or something else handles it for you. For instance, ActiveRecords. Rails does not  create foreign keys for you. It only creates the primary key. It does not impose constraint on the database level. The association is handled on the application [...]

Comments ( 0 )

Note to self

Do not name your database column with the name ‘no’. You’ll get this error when you try to run your test ActiveRecord::StatementInvalid: Mysql::Error: Unknown column ‘false’ in ‘field list’

Comments ( 1 )