I currently have a model Attend that will have a status column, and this status column will only have a few values for it. STATUS_OPTIONS = {:yes, :no, :maybe}
1)
This is how I implement in my Rails 4 project.
class Attend < ActiveRecord::Base enum size: [:yes, :no, :maybe] validates :size, inclusion: { in: Attend.sizes.keys } end
Attend.sizes gives you the mapping.
Attend.sizes # {"yes" => 0, "no" => 1, "maybe" => 2}
See more in Rails doc