rhino_project_core 0.22.0.beta.1 → 0.22.0.beta.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/rhino/crud_controller.rb +1 -1
- data/lib/rhino/sieve/filter.rb +1 -1
- data/lib/rhino/sieve/order.rb +1 -1
- data/lib/rhino/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: a603355fe23c2fd89324769fd34482366180eacef7a16cae9ca02d808440d52a
|
4
|
+
data.tar.gz: 631368ed0fb4dd42867cad207227bdc403dea7f74fc65de364cb8e514a2f7540
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c7dfe8659e48b555d0ad76993ccd0ba032083863f16772524a453bad156a1229044a2dca07d1bf1f897c19e7242ff284ee7272e45b0ce6c1f3b9f69a1f1a293
|
7
|
+
data.tar.gz: 77b41a5cb84246fb10493c5ba5d236cb6dd3d7286588314aebdc918acf95c74765836f021dee45f8e167eab41ce80b63ab6b6d7d7529929704977e65d74e6bc4
|
@@ -24,7 +24,7 @@ module Rhino
|
|
24
24
|
@models = klass.sieves.resolve(policy_scope(klass), params)
|
25
25
|
render json: {
|
26
26
|
results: @models.eager_load_refs.map { |m| permit_model(m) },
|
27
|
-
total: @models.unscope(:limit, :offset).reselect(
|
27
|
+
total: @models.unscope(:limit, :offset).reselect(klass.primary_key).count
|
28
28
|
}
|
29
29
|
end
|
30
30
|
|
data/lib/rhino/sieve/filter.rb
CHANGED
@@ -13,7 +13,7 @@ module Rhino
|
|
13
13
|
|
14
14
|
filter = params[:filter].permit!.to_h
|
15
15
|
scope = scope.joins(get_joins(scope.klass, filter))
|
16
|
-
query = apply_filters(scope, scope.klass, filter).distinct(
|
16
|
+
query = apply_filters(scope, scope.klass, filter).distinct(scope.klass.primary_key)
|
17
17
|
@app.resolve(query, params)
|
18
18
|
end
|
19
19
|
|
data/lib/rhino/sieve/order.rb
CHANGED
@@ -13,7 +13,7 @@ module Rhino
|
|
13
13
|
@param = params[:order]
|
14
14
|
|
15
15
|
# Always append id to the end of the order clause to ensure a stable sort for pagination
|
16
|
-
result = apply_order.order(
|
16
|
+
result = apply_order.order(scope.primary_key)
|
17
17
|
@app.resolve(result, params)
|
18
18
|
end
|
19
19
|
|
data/lib/rhino/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhino_project_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.22.0.beta.
|
4
|
+
version: 0.22.0.beta.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Rosevear
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|