Module: EnumerateIt::ClassMethods
- Defined in:
- lib/enumerate_it/class_methods.rb
Instance Method Summary collapse
Instance Method Details
#has_enumeration_for(attribute, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/enumerate_it/class_methods.rb', line 3 def has_enumeration_for(attribute, = {}) self.enumerations = enumerations.dup define_enumeration_class(attribute, ) create_enumeration_humanize_method([:with], attribute) create_enumeration_key_method([:with], attribute) store_enumeration([:with], attribute) (attribute, ) end |