Module: Mongoid::Document::Flagable
- Defined in:
- lib/mongoid-flags.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/mongoid-flags.rb', line 4 def self.included(base) base.class_eval do |klass| klass.field :flags, type: Array klass.index({ flags: 1 }, { background: true }) include InstanceMethods extend ClassMethods end end |