standard_pagination 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d60e0bc850fa3f5f3efdfc07c355de37b9c4d569d86f05ddd47962c20e4a1636
4
- data.tar.gz: dd47c304ed63c9f5a6df5f7c69a07eff5ef32fe495b372fe1cc0b1b072af52e7
3
+ metadata.gz: 149b70a719e0da5a83ca318611fd7a97c8c01678022e9ca52831b2007285b138
4
+ data.tar.gz: 6be9f28d0f29f6179a4a38abcebad5e985ad992a35cf08d5c0eeb1746b2edf35
5
5
  SHA512:
6
- metadata.gz: f07018870793cd23b22a8043c8e0aa34977dbf46547355922e90855135ee36fa6fb60cccc452f4bebff45ca4667cdd9456e4a176f5f922bde78dfc977dbc407e
7
- data.tar.gz: 5a0762267cadaf3fad98ad90b2dd7cef1dfee4862bc66ee8d4b1dcf0c1e5966e8384afebe1063c50f434c1b0d073add3b47d39e1c131096cf170a5fa9d468c5e
6
+ metadata.gz: 6dc0d679a00cea8898d0da4d9369c38238ffff057eb4e1e691c82f764ce781f9690083d6ce1873fe2c9a0f2dc4409e3da5c44bc4219a092892bd253340a16e4e
7
+ data.tar.gz: 4f345dc7fb354212d8a4c9b02f950449fe80a8c8c99dee233bb149f770445ae0a9906e82f1443edd22b9118662c2f0a7d3ed51f3f5b6a133e21c803bc5a7b928
data/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.1] - 2026-10-25
11
+
12
+ ### Fixed
13
+ - `Controller#paginate` raised `NoMethodError` (`select_values` for Array) when given an in-memory Array, such as an assembled audit timeline. The inline-DISTINCT count check added late in 0.1.0 assumed an ActiveRecord relation. Arrays paginate again, and a spec covers them. Found while adopting the gem in fundbright-web.
14
+
10
15
  ## [0.1.0] - 2026-10-25
11
16
 
12
17
  ### Added
@@ -39,8 +39,11 @@ module StandardPagination
39
39
  relation.from_clause.empty?
40
40
  end
41
41
 
42
- # `select("DISTINCT category")` leaves distinct_value unset.
42
+ # `select("DISTINCT category")` leaves distinct_value unset. False for
43
+ # anything that isn't a relation (arrays, search results).
43
44
  def inline_distinct?(relation)
45
+ return false unless defined?(::ActiveRecord::Relation) && relation.is_a?(::ActiveRecord::Relation)
46
+
44
47
  relation.select_values.any? { |value| !value.is_a?(Symbol) && value.to_s.match?(/\bdistinct\b/i) }
45
48
  end
46
49
 
@@ -1,3 +1,3 @@
1
1
  module StandardPagination
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standard_pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaryl Sim