When I do scaffold generated code for a table that has "enum" in it and i goto to the "new" button, no options are given. Anyway i could automate it so i can get a drop down box when using enums?
on 2006-01-28 06:20
on 2006-01-28 06:41
OK, let me restate this, i looked at the wiki but it seems cumbersome, isn't there a helper or plugin, or something to reduce code redundancy when doing enums?
on 2006-01-30 14:56
I *think* mysql is really the only db that supports enums, that's probably why rails doesn't bother with them. Personally, I don't think enums should be used, because my opinion is that the data validation should be done at a higher level (in this case ActiveRecord). So just use a varchar in your table and use validates_inclusion_of in your model. -Jonny. zbyte pepsi-hola wrote: > OK, let me restate this, i looked at the wiki but it seems cumbersome, > isn't > there a helper or plugin, or something to reduce code redundancy when > doing > enums?