rhino_project_core 0.22.0.beta.3 → 0.22.0.beta.5

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: 5a2ab53fa629af87782ad13972070920c48a8fae2fc3d9988abc7ade286b2f58
4
+ data.tar.gz: f16a39aa3e229b5eee2c357517f2731174b7649b09acf411133d863899a73d2c
5
5
  SHA512:
6
- metadata.gz: cc2c1bf5e4942bfc8db62cb9ccf3bfc6ea7e0245b594ef5e2bb04a5bafd33a4dbdacad8f60161bed83558b7f6f5db3d5d0d36fc1c225f1d6d682147d86f5491e
7
- data.tar.gz: dba1e3f090c58c3aa08614da003b3a13c160364383dd8ddfdb4f42afe288a3e4f219c0f1f364ce480ef8567c4a7911a193fd53bc1a4b91d8579e5ef33fd685f8
6
+ metadata.gz: de129122de6f46a98590b6fdc1d786952f74d71e6023bbf1e5d88b8232f7caf2849db6c4947792dab6bc23feaa31d82bfabafe3744e13402944795868c200614
7
+ data.tar.gz: 4aacbd42bfdb8b3c28e152daddc789966112b0acaf6aebd388882c60b915512b8c0908ca02182cadde72e9d65ebd9ad68bad73e4d1a3d457aa93f623f0a9b3ce
@@ -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
 
@@ -48,7 +48,7 @@ module Rhino
48
48
  return if global_owner?
49
49
 
50
50
  inject_into_file model_file, after: /#{owner_call}/ do
51
- "\n rhino_references %i[#{reference_attributes.map(&:name).join(' ')}]\n"
51
+ "\n rhino_references %i[ #{reference_attributes.map(&:name).join(' ')} ]"
52
52
  end
53
53
  end
54
54
 
@@ -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.5"
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.5
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-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -330,14 +330,14 @@ dependencies:
330
330
  requirements:
331
331
  - - '='
332
332
  - !ruby/object:Gem::Version
333
- version: 1.1.1
333
+ version: 2.0.2
334
334
  type: :runtime
335
335
  prerelease: false
336
336
  version_requirements: !ruby/object:Gem::Requirement
337
337
  requirements:
338
338
  - - '='
339
339
  - !ruby/object:Gem::Version
340
- version: 1.1.1
340
+ version: 2.0.2
341
341
  - !ruby/object:Gem::Dependency
342
342
  name: rake
343
343
  requirement: !ruby/object:Gem::Requirement