Module: Libis::Workflow::Mongoid::Dynamic

Defined in:
lib/libis/workflow/mongoid/dynamic.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/libis/workflow/mongoid/dynamic.rb', line 20

def self.included(klass)
  klass.extend(ClassMethods)

  klass.class_eval do

    include ::Mongoid::Document
    include ::Mongoid::Attributes::Dynamic
    include ::Libis::Workflow::Mongoid::Sequence

    field :_id, type: Integer, overwrite: true
    sequence :_id

  end
end