Displaying 1 result from an estimated 1 matches for "datalevel".
Did you mean:
atlevel
2006 Sep 09
1
Getting Valid ENUM Values in ActiveRecord
I know that Rails doesn''t handle database ENUMs. I''d say that 9/10, you
can get away with just using varchar instead. However, there ARE
instances where you need certain functionality that ENUMs provide (ie:
integrity at the datalevel).
I have a working function that will show what enum types are available
for a certain column in a table (I believe this will only work for
MySQL). I would like to take it a step further and abstract this at the
ActiveRecord::Base level. I have the following function, which works if
placed in th...