filternator 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/filternator/filter.rb +1 -1
- data/lib/filternator/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: 82f0c46375dde16ab7532075d52291d28be82c5e
|
4
|
+
data.tar.gz: ef7d2847bd06b6aff7c54e98468fbc47d82085e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e074b3c9b3e0c91c94fa941e6a77c0564831981aa2748ecbe153aa704d63a011e7ec481689f7c12aed05f98f14eaa00ca548501ea632a83bcbf9681f163aba39
|
7
|
+
data.tar.gz: 950b3227ca852897f68f5cb994c7464be3d96a0032adb325823305073f23ce6ff5546edb13a7bd312d3ddc09f3959e2f4752f49fada78366fb6542614045f2eb
|
data/lib/filternator/filter.rb
CHANGED
@@ -14,7 +14,7 @@ module Filternator
|
|
14
14
|
def stats
|
15
15
|
pairs = all_filters.map { |filter|
|
16
16
|
result = apply(filter: filter).count
|
17
|
-
result = result.
|
17
|
+
result = result.values.inject(:+) if result.is_a?(Hash) # ActiveRecord `group by` fix
|
18
18
|
[ filter, result ]
|
19
19
|
}
|
20
20
|
Hash[pairs]
|
data/lib/filternator/version.rb
CHANGED