oujoke 0.0.0 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,12 +17,12 @@ module Oujoke
17
17
  end
18
18
 
19
19
  def workflow_data
20
- @_workflow_data ||= Oujoke::Workflow::Base.new(self.raw_workflow)
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?(:raw_workflow)
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], :raw_workflow => options[:data] , :invoice_id => options[:invoice_id])
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?(:raw_workflow)
31
+ raise NonPersistenseModel unless receiver.new.respond_to?(:data)
32
32
  receiver.extend ClassMethods
33
33
  receiver.send :include, InstanceMethods
34
34
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
+ - 1
7
8
  - 0
8
- - 0
9
- version: 0.0.0
9
+ version: 0.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dieinzige