Creating easy, readable attributes with ActiveRecord enums
Imagine a question that can be either “pending”, “approved”, or “flagged”. Some models call for this kind of data. An attribute that can have only one of a few different values, values that rarely change. Recently, Rails took a stab at solving this with ActiveRecord enums.
Post a comment