Sha256: 968d06252a914fc33a574a84fcf6dca8ac7ef6830e1d51954be2f5f435cb27c8
Contents?: true
Size: 303 Bytes
Versions: 1
Compression:
Stored size: 303 Bytes
Contents
module Enumitation autoload :ClassMethods, 'enumitation/class_methods' ActiveRecord::Base.instance_eval do def enumitation(attribute, values) extend ClassMethods self.enumitation_values[attribute] = Array(values) add_inclusion_validation(attribute, values) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
enumitation-0.0.3 | lib/enumitation.rb |