kaminari-activerecord 1.2.1 → 1.2.2

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: 6876071aa2d14ad868c0b30fe2d47478c6237c8d2e32f5e09ff2d6406d308f8c
4
- data.tar.gz: 9ab1589acaec71a5ad35eeb9f80b38d7d6abcfd4f9ee83a468ab9686e8bcb2e1
3
+ metadata.gz: e02b1d73471d5966fc0a51c928644d0f47318e6de292267cecfc6742983c24dc
4
+ data.tar.gz: 77dfa6a9124df355c7b3ac038f5c8db374ee0769f58d22ebb9db48b448fe5b00
5
5
  SHA512:
6
- metadata.gz: dc82c0b5e7aa6292bdbe94474b1a7c532706a6d07886a7a44134e49d593102d21a052a29cbd8edf187b7b1a0e736a1638bdd92fcfa7fe3bc4a6b54b2fb73599f
7
- data.tar.gz: 7c6904976fdc124170c8b01294dacca2433e86895f60f7a1cabfccfd780cfac2f59263cd1777dc70cbf74e745939174b5ee29eee7df20909eca537b45172e001
6
+ metadata.gz: f5cc9d8c8ee50631d2086ac46b50f9b4acd2cb7860a750089de6665578465d1130f0dbcae116c904d8646dc4daae36ffe87d9a71aadcfb8171d76267802fae99
7
+ data.tar.gz: 6ec4e5f73926f62ae1a8ce0ccca455932336147cef42203be1ffd821199317fed96f87a76ec8d3277b2a2e1c5c4cb48dc0b7f5e8703d273b03d269d0de59f8e1
@@ -59,15 +59,17 @@ module Kaminari
59
59
  refine ::ActiveRecord::Relation do
60
60
  private
61
61
 
62
- # Update multiple instance variables that holds `limit` to a given value
62
+ # Update multiple instance variables that hold `limit` to a given value
63
63
  def set_limit_value(new_limit)
64
64
  @values[:limit] = new_limit
65
65
 
66
66
  if @arel
67
- case @arel.limit
68
- when Integer
67
+ case @arel.limit.class.name
68
+ when 'Integer', 'Fixnum'
69
69
  @arel.limit = new_limit
70
- when Arel::Nodes::BindParam
70
+ when 'ActiveModel::Attribute::WithCastValue' # comparing by class name because ActiveModel::Attribute::WithCastValue is a private constant
71
+ @arel.limit = build_cast_value 'LIMIT', new_limit
72
+ when 'Arel::Nodes::BindParam'
71
73
  if @arel.limit.respond_to?(:value)
72
74
  @arel.limit = Arel::Nodes::BindParam.new(@arel.limit.value.with_cast_value(new_limit))
73
75
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Kaminari
4
4
  module Activerecord
5
- VERSION = '1.2.1'
5
+ VERSION = '1.2.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaminari-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-27 00:00:00.000000000 Z
11
+ date: 2021-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kaminari-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.1
19
+ version: 1.2.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2.1
26
+ version: 1.2.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -86,7 +86,7 @@ homepage: https://github.com/kaminari/kaminari
86
86
  licenses:
87
87
  - MIT
88
88
  metadata: {}
89
- post_install_message:
89
+ post_install_message:
90
90
  rdoc_options: []
91
91
  require_paths:
92
92
  - lib
@@ -101,8 +101,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubygems_version: 3.2.0.pre1
105
- signing_key:
104
+ rubygems_version: 3.3.0.dev
105
+ signing_key:
106
106
  specification_version: 4
107
107
  summary: Kaminari Active Record adapter
108
108
  test_files: []