I have items in my database schema that are an integer and are set to a specific number correlating to an item. For instance, a column named appointment_type can have the value set of 0=Unknown, 1=Medical, 3=Trial, etc... I don't want to use magic numbers in my rails code and would prefer an Enum like solution to make the code more maintainable and readable. Furthermore, there is more than one table that has this appointment_type column, so I want to be able to use the "enum" to address other columns as well.
I was thinking having a global enum like item since I will need to access this in my model, controller and view. It may be less likely that I need to access it in my model, but definitely within the controller and view.
Is there a good way to handle this?