toast 1.1.9 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/toast/collection_request.rb +2 -1
- data/lib/toast/plural_assoc_request.rb +1 -1
- data/lib/toast/version.rb +1 -1
- 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: d6bac0aaae6565778af7d5db99b3d4ead33bda44e18a67a1d21c0b8c865d8569
|
4
|
+
data.tar.gz: 8f129b492aafb91120384105b81cbb899aba47bd861544b4a9b36c155830dffe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f63c4e7d181b18e4c66823271d77d9084883cbad688b54ca1bcf4ef96ef6e4272d682f47b600989fbbda40b5081f6a20d5467bf3e2c81a12e43dfef15b62d53
|
7
|
+
data.tar.gz: eff59d7fb0ae818921fef8b0cf74a3a4abc4d0dfab1381cae5523621acd5f81bf64bd4c34e189f44fcbe48e98e5e5797678c1571e73bcb312be75d2790986d26
|
@@ -53,7 +53,8 @@ class Toast::CollectionRequest
|
|
53
53
|
|
54
54
|
result = relation.limit(window).offset(range_start)
|
55
55
|
|
56
|
-
count = relation.unscope(:select).select(:id).count
|
56
|
+
count = relation.unscope(:select,:order).distinct(false).select(:id).count
|
57
|
+
|
57
58
|
headers = {"Content-Type" => @config.media_type}
|
58
59
|
|
59
60
|
if count > 0
|
@@ -67,7 +67,7 @@ class Toast::PluralAssocRequest
|
|
67
67
|
# this fails if the where clause depends on the the extended select
|
68
68
|
# also remove any ORDER clauses
|
69
69
|
|
70
|
-
count = relation.unscope(:select).select(:id).count
|
70
|
+
count = relation.unscope(:select,:order).distinct(false).select(:id).count
|
71
71
|
if(count.is_a? Hash)
|
72
72
|
# can happen with 'GROUP BY'
|
73
73
|
count = count.length
|
data/lib/toast/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- robokopp (Robert Annies)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|