Similarly to how mongoose for nodejs has an enum validator whereby the value of the field must be one of the values in a predefined array, how would a mongoid model in Rails replicate this behavior?
ie.
field :category, type: String --> must be in one of [categoryA, categoryB, categoryC]