Module: Enumerize::Scope::Mongoid
- Defined in:
- lib/enumerize/scope/mongoid.rb
Instance Method Summary collapse
Instance Method Details
#enumerize(name, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/enumerize/scope/mongoid.rb', line 6 def enumerize(name, ={}) super _enumerize_module.dependent_eval do if self < ::Mongoid::Document if [:scope] _define_mongoid_scope_methods!(name, ) end end end end |