An enum is a data type made out of a set of named values. Let’s leverage them — In Ruby on Rails, an enum is an attribute where the values map to integers in the database and can be queried by name. For example, we could define an enum for the status attribute, where the possible values are pending, active, or archived. Ruby on Rails added support for…