acts_as_living 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/acts_as_living/scopes_definer.rb +1 -1
- data/lib/acts_as_living/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22753ff3ef8b8cea17388e829a27a35d7df50f149d2122e0eb78bb03adfd7268
|
4
|
+
data.tar.gz: 88bd7bc883536421e6eb8253f780caa759156015ae5fe077ec366c5708289846
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bd734f95d3fafce29a5b4b8bffb26a630f77d4b19cecf3dbbb069fc14ec9bff3fbab5a65f0b5ecae26a866baf7c6a6cce7a1531470b5b379ec4989313caab95
|
7
|
+
data.tar.gz: 9d61ea225e1626724de291ddd01410e3d07b75df945b73c3b7b176cf4417ff8b743d8e43258056f4a0215ba5886b742a4ea13ab5be52d708faa3eb1c8841c500
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module ActsAsLiving::ScopesDefiner
|
2
2
|
def self.call(klass)
|
3
3
|
klass.class_eval do
|
4
|
+
byebug
|
4
5
|
stages.each do |stage, _num|
|
5
6
|
scope "past_#{stage}", -> { where('stage >= ?', stages[stage]) }
|
6
7
|
scope "pre_#{stage}", -> { where('stage < ?', stages[stage]) }
|
7
|
-
scope "not_#{stage}", -> { where.not(stage: stage) }
|
8
8
|
end
|
9
9
|
|
10
10
|
scope :cancelled, -> { where('stage < 0') }
|