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: c62461c4c0310350845f94c41ac762fc39e55892471c3b3f27482000ce2573fb
4
- data.tar.gz: 0cc0e0d561bedeac454bcec204b56e7b2cb85bf84e0785ed50862753604c60f3
3
+ metadata.gz: bf647b2ea44a63802d14f2c081273c4de0e8b85cf896344cffd09a003bcbc142
4
+ data.tar.gz: 5c3ab04547cf6ffb0933e9a922091d443907fc92e5fa75c0e4a779decc2d4e13
5
5
  SHA512:
6
- metadata.gz: 4a2b046f6ee4792539aea7b84fc3a0e65994c39d0f1d14f58cb2d3e57b39a9f4181b61c66dc5bd90462a16fbd6f6b351fbef653189d6c264c543d16c53ee7ca1
7
- data.tar.gz: 74ab23173240984e9296544ad760172878d14b4d22cd4d01857f362d36220e90e530fe488933ba0fe29fd46ccff9ae909bac35d28323cbc615964492ea3e6096
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 = value
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 ||= build_cursor_relation(@cursor).count(:all)
187
+ @total_count ||= @relation.count(:all)
188
188
  end
189
189
 
190
190
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordCursorPaginate
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
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.0
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-03-10 00:00:00.000000000 Z
11
+ date: 2025-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord