grape-listing 1.1.8 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/listing_service/args_handling.rb +1 -1
- data/lib/listing_service/search.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4640c1fef7edd90ba2d131032ba1f8ee8d5edf276d8a703f114b7d944e0ef52
|
4
|
+
data.tar.gz: c5cccf46f30fddf0fa7bf7b9f128e42fc6a6fe3291c941a302ea4c440e34e726
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96658857f1c6b6f2eecc2b45417c2240dad18880ae87dd6e0d9522f468fcda24ab50bfc9cb20762166e664f0a1b2f78739122c8c5041783914a7ef4c9f8e7478
|
7
|
+
data.tar.gz: 38681ed959270122c72573669b9ba6d92bf534adace4b99ee948e1f2e25580e9d9da6056229c3484a23a53f21c735c1d93414714c5c6ec42617be32cbec70c64
|
@@ -58,7 +58,7 @@ module GrapeListing
|
|
58
58
|
return cached if cached
|
59
59
|
|
60
60
|
# получение кол-ва записей из запроса к БД
|
61
|
-
count = @model.merge(@scopes).count(:id)
|
61
|
+
count = @model.merge(@scopes).distinct.count(:id)
|
62
62
|
|
63
63
|
# кеширование кол-ва записей при превышении порогового значения
|
64
64
|
if count >= 1_000
|
@@ -19,8 +19,8 @@ module GrapeListing
|
|
19
19
|
# название скоупа из модели, который нужно применить
|
20
20
|
scope_name = operator.split('.')[1]
|
21
21
|
# применение скоупа
|
22
|
-
@objects = list.send(scope_name, value)
|
23
|
-
@objects_count = @objects.count
|
22
|
+
@objects = list.send(scope_name, value).distinct
|
23
|
+
@objects_count = @objects.distinct.count
|
24
24
|
next
|
25
25
|
end
|
26
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-listing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Павел Бабин
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|