status_workflow 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +10 -0
- data/lib/status_workflow.rb +7 -1
- data/lib/status_workflow/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb9130d6f16327b6b45eede2597c13cde33c20dc
|
4
|
+
data.tar.gz: '08197cc5822f7b153e01c691d0f21166a1942414'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c5f5b2008ed00ddb9c6f0ace025e0f6ae2753101fae3be9d88d52712551595b3720f7724de94470e13a16bf74e64d6310382c10f15ce9c9cec879f35cf3ec14
|
7
|
+
data.tar.gz: bef5b253cc517f759915498e7c43ea6d65f75e4e7b99935304fe83d6b60a89c44521f8afb1482bea0fd7c7c4c1ac09eedc234be9a9ce384bc5d36fdc723d8c08
|
data/CHANGELOG
CHANGED
data/lib/status_workflow.rb
CHANGED
@@ -96,10 +96,16 @@ module StatusWorkflow
|
|
96
96
|
end
|
97
97
|
transitions.inject({}) do |memo, (from_status, to_statuses)|
|
98
98
|
to_statuses.each do |to_status|
|
99
|
+
to_status = to_status.to_sym
|
99
100
|
memo[to_status] ||= Set.new
|
100
|
-
memo[to_status] << from_status
|
101
|
+
memo[to_status] << from_status.to_sym
|
101
102
|
end
|
102
103
|
memo
|
104
|
+
end.tap do |to_from|
|
105
|
+
to_from[:error] = Set.new
|
106
|
+
to_from.each do |to_status, from_statuses|
|
107
|
+
to_from[:error].merge from_statuses
|
108
|
+
end
|
103
109
|
end.each do |to_status, from_statuses|
|
104
110
|
define_method "#{prefix_}enter_#{to_status}!" do
|
105
111
|
send "#{prefix_}status_transition!", nil, to_status
|