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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/standard_pagination/stable_order.rb +4 -1
- data/lib/standard_pagination/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 149b70a719e0da5a83ca318611fd7a97c8c01678022e9ca52831b2007285b138
|
|
4
|
+
data.tar.gz: 6be9f28d0f29f6179a4a38abcebad5e985ad992a35cf08d5c0eeb1746b2edf35
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|