acts_as_living 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 856f21c5919a8fcea61ad831f12fd5b9fb258b29f9ec5a85ce535dedb9d47e51
|
4
|
+
data.tar.gz: a38410651c7ef62461f70c0f561475f80786a7f7b3a93cc8493f88c20b1a0265
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad159cbc05a79900e7d4f2321f3d4bb67a8f2a15becf3e5a44e263f497817472e4693dce0d7bb33bc03698ce7028a56e2a9cb5d1e72f3bb898a46f182cb0ea10
|
7
|
+
data.tar.gz: c54a511823f00e85594bfc82229aff09f91dddc70b9d089e9fa1cfd0ea0929077b85b268f51de82ed22374c4bcf5cc66628a1d2d1078a246564cfc43d9cc7128
|
@@ -143,12 +143,12 @@ module ActsAsLiving::MethodsDefiner
|
|
143
143
|
last_stage == stage
|
144
144
|
end
|
145
145
|
|
146
|
-
def
|
146
|
+
def first_stage
|
147
147
|
(stage_keys - %i[cancelled]).first
|
148
148
|
end
|
149
149
|
|
150
150
|
def first_stage?(stage)
|
151
|
-
|
151
|
+
first_stage == stage
|
152
152
|
end
|
153
153
|
|
154
154
|
def death
|
@@ -24,9 +24,9 @@ module ActsAsLiving::ValidationsDefiner
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def stage_is_first_stage
|
27
|
-
return if
|
27
|
+
return if first_stage?
|
28
28
|
|
29
|
-
errors.add(:stage, "Contract has to be initialized with '#{
|
29
|
+
errors.add(:stage, "Contract has to be initialized with '#{first_stage}' stage")
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|