Sha256: 73d7bda7532002ed84936505a7beeeccbbafb5d805318d6cd0b94af47fc97fb5
Contents?: true
Size: 326 Bytes
Versions: 13
Compression:
Stored size: 326 Bytes
Contents
require 'enumerated_attribute' class User < ActiveRecord::Base validates_presence_of :first_name, :gender, :age, :status, :degree validates_numericality_of :age enum_attr :gender, %w(male female) enum_attr :status, %w(single married divorced widowed) enum_attr :degree, %w(^none high_school college graduate) end
Version data entries
13 entries across 12 versions & 3 rubygems