Background: I had a legacy database that used MySQL enum types. Normally, Rails works fine just by treating these columns as strings. I realized that Rails did not work properly on one of the enum columns that happened to have a possible value of "sprint"
Problem: When an enum type has a possible value of "sprint" the attribute displasy as "0" or blank when accessed. It does not matter whether the actually assigned value of the attribute is set to "sprint" or not.
Quick example to reproduce:
mysql> create table blobs (id int, b enum('value1', 'value2', 'sprint'));
mysql> insert into blobs values (1, 'value1');
mysql> insert into blobs values (2, 'value2');
mysql> insert into blobs values (3, 'sprint');
$ script/generate scaffold blob
Workaround: Removing "sprint" as an available option fixes the problem, but this is not really an optimal workaround for my particular situation.
Environment: Windows XP, ruby 1.8.2, Rails 1.0, MySQL 4.1.13a