I have an Employee model that has a SecurityClearanceLevel. When you make a new employee, you’re asked to set a SecurityClearanceLevel by choosing from a <select> list. The problem is that when I save the object, it’s a string, not a SecurityClearanceLevel, so the save fails.
Where do I take care of this kind of back-and-forth conversion, and what’s the best way to do it?
Rails gives you a few variations around doing this. You should be able to do something like this:
Take a look at the Rails Guide on the select and option tags for the full details.