Module: EnumerateIt::ClassMethods
- Defined in:
- lib/enumerate_it.rb
Instance Method Summary collapse
Instance Method Details
#has_enumeration_for(attribute, options) ⇒ Object
174 175 176 177 178 179 180 181 182 |
# File 'lib/enumerate_it.rb', line 174 def has_enumeration_for(attribute, ) if self.respond_to? :validates_inclusion_of validates_inclusion_of attribute, :in => [:with].list, :allow_blank => true end create_enumeration_humanize_method [:with], attribute if [:create_helpers] create_helper_methods [:with], attribute end end |