Re:Things I wished more developers knew about databases
by evsasse on Thursday April 23, 2020 @08:42AM
(#22955296)
A nice "trick" is to declare your enum column on the database as a string, and your enum in the code as a hash with string values. So you can have self-explained data saved onto the database, and all the niceties Rails gives you from the enum.
[ Parent
| on HN ]