activerecord_cursor_paginate 0.4.0 → 0.4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf647b2ea44a63802d14f2c081273c4de0e8b85cf896344cffd09a003bcbc142
|
4
|
+
data.tar.gz: 5c3ab04547cf6ffb0933e9a922091d443907fc92e5fa75c0e4a779decc2d4e13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb9d0d6d8f721f9991ff3e723a37c63b6b365eae1443c265b6e8bd0815fa819ec1e59440fdf91a894ddd02d31a804830a0a82847afa0b78d07012c183456df4d
|
7
|
+
data.tar.gz: b26544f0050d9f8a3267cd4134aa24c9b47f6f2e3574769106b063fe70a904ff7e6f61a23e9215f0fcc0179962b19118e4e7bc06b0a9a2b0ff3a6a3d2f575e38
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## master (unreleased)
|
2
2
|
|
3
|
+
## 0.4.1 (2025-04-08)
|
4
|
+
|
5
|
+
- Fix `Paginator#total_count` to not change when paginating
|
6
|
+
- Fix `Paginator#limit` to return default page size by default
|
7
|
+
|
3
8
|
## 0.4.0 (2025-03-10)
|
4
9
|
|
5
10
|
- Add ability to paginate backward from the end of the collection
|
@@ -104,7 +104,7 @@ module ActiveRecordCursorPaginate
|
|
104
104
|
config = ActiveRecordCursorPaginate.config
|
105
105
|
@page_size = value || config.default_page_size
|
106
106
|
@page_size = [@page_size, config.max_page_size].min if config.max_page_size
|
107
|
-
@limit =
|
107
|
+
@limit = @page_size
|
108
108
|
end
|
109
109
|
|
110
110
|
def order=(value)
|
@@ -184,7 +184,7 @@ module ActiveRecordCursorPaginate
|
|
184
184
|
# @return [Integer]
|
185
185
|
#
|
186
186
|
def total_count
|
187
|
-
@total_count ||=
|
187
|
+
@total_count ||= @relation.count(:all)
|
188
188
|
end
|
189
189
|
|
190
190
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord_cursor_paginate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fatkodima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|