rhino_project_core 0.22.0.beta.3 → 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: 5838aeae096ee9616cbec4aa982c79e58a76db70b9f219f90d1da3ca55386f2e
4
- data.tar.gz: 3ef26946913e2bd9a2bf4d2da4732b991f9b34ba82ca72b24978d79223bf0a16
3
+ metadata.gz: a603355fe23c2fd89324769fd34482366180eacef7a16cae9ca02d808440d52a
4
+ data.tar.gz: 631368ed0fb4dd42867cad207227bdc403dea7f74fc65de364cb8e514a2f7540
5
5
  SHA512:
6
- metadata.gz: cc2c1bf5e4942bfc8db62cb9ccf3bfc6ea7e0245b594ef5e2bb04a5bafd33a4dbdacad8f60161bed83558b7f6f5db3d5d0d36fc1c225f1d6d682147d86f5491e
7
- data.tar.gz: dba1e3f090c58c3aa08614da003b3a13c160364383dd8ddfdb4f42afe288a3e4f219c0f1f364ce480ef8567c4a7911a193fd53bc1a4b91d8579e5ef33fd685f8
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.3"
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.3
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-21 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