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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f1237160b8a818936891e456d4219cc31cb0d45e9a806bf315de062c641826a
4
- data.tar.gz: 18b76c38e2270591c8d43941496b7d96f138177f9ca34c5311088ceeec6f2d35
3
+ metadata.gz: a603355fe23c2fd89324769fd34482366180eacef7a16cae9ca02d808440d52a
4
+ data.tar.gz: 631368ed0fb4dd42867cad207227bdc403dea7f74fc65de364cb8e514a2f7540
5
5
  SHA512:
6
- metadata.gz: d100bbacdb951725dae70482f1c6cbcdad27c9fa6baafbe2ee23effa2cccee48ebd6597221c9e1727c33fada8b0dfa47971214dfc998463ade19b2384044bf9c
7
- data.tar.gz: e1951f25454cb9c0435193be35dc76a660c3a2f1f3a68a38152c061fa894be2d8f3f6b4dc3cb1917b3a12872f7dc63afa589f41fd866dcf01ef8f52b1256153a
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(:id).count
27
+ total: @models.unscope(:limit, :offset).reselect(klass.primary_key).count
28
28
  }
29
29
  end
30
30
 
@@ -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(:id)
16
+ query = apply_filters(scope, scope.klass, filter).distinct(scope.klass.primary_key)
17
17
  @app.resolve(query, params)
18
18
  end
19
19
 
@@ -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(:id)
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
@@ -10,7 +10,7 @@ module Rhino
10
10
  MAJOR = 0
11
11
  MINOR = 22
12
12
  TINY = 0
13
- PRE = "beta.1"
13
+ PRE = "beta.4"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
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.1
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-18 00:00:00.000000000 Z
11
+ date: 2024-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails