oujoke 0.0.0 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/workflow/business_process.rb +2 -2
- data/lib/workflow.rb +2 -2
- metadata +2 -2
@@ -17,12 +17,12 @@ module Oujoke
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def workflow_data
|
20
|
-
@_workflow_data ||= Oujoke::Workflow::Base.new(self.
|
20
|
+
@_workflow_data ||= Oujoke::Workflow::Base.new(self.data)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.included(receiver)
|
25
|
-
raise NonPersistenseModel unless receiver.new.respond_to?(:
|
25
|
+
raise NonPersistenseModel unless receiver.new.respond_to?(:data)
|
26
26
|
receiver.extend ClassMethods
|
27
27
|
receiver.send :include, InstanceMethods
|
28
28
|
end
|
data/lib/workflow.rb
CHANGED
@@ -20,7 +20,7 @@ module Oujoke
|
|
20
20
|
#
|
21
21
|
def start(options = {})
|
22
22
|
#todo validation for main optons
|
23
|
-
bp = options[:klass].new(:workflow_id => self.id , :_contact => options[:_contact], :
|
23
|
+
bp = options[:klass].new(:workflow_id => self.id , :_contact => options[:_contact], :data => options[:data] , :invoice_id => options[:invoice_id])
|
24
24
|
bp.current_state = "created_state"
|
25
25
|
bp.save!
|
26
26
|
end
|
@@ -28,7 +28,7 @@ module Oujoke
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def self.included(receiver)
|
31
|
-
raise NonPersistenseModel unless receiver.new.respond_to?(:
|
31
|
+
raise NonPersistenseModel unless receiver.new.respond_to?(:data)
|
32
32
|
receiver.extend ClassMethods
|
33
33
|
receiver.send :include, InstanceMethods
|
34
34
|
end
|