Module: Enumerize::MongoidSupport
- Defined in:
- lib/enumerize/mongoid.rb
Instance Method Summary collapse
Instance Method Details
#enumerize(name, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/enumerize/mongoid.rb', line 3 def enumerize(name, ={}) super _enumerize_module.dependent_eval do if self < ::Mongoid::Document after_initialize :_set_default_value_for_enumerized_attributes end end end |