Module: Workflowable::ModelAdditions::ClassMethods

Defined in:
lib/workflowable/model_additions.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_workflowableObject



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/workflowable/model_additions.rb', line 28

def acts_as_workflowable
  include Workflowable::ModelAdditions::LocalInstanceMethods
  class_eval do
    attr_accessor :workflow_options
    attr_accessor :current_user

    belongs_to :workflow, :class_name => "Workflowable::Workflow"
    belongs_to :stage, :class_name => "Workflowable::Stage"
    before_save :set_default_stage

  end
end