Skip to content

Commit 99e60f2

Browse files
committed
deps: bump mongoid-scroll to 2.0
1 parent bd3e97c commit 99e60f2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* Your contribution here.
66
* [#175](https://github.com/slack-ruby/slack-ruby-bot-server/pull/175): Fix(activerecord): correctly check for database in rails 7.2+ - [@markokajzer](https://github.com/markokajzer).
7+
* [#176](https://github.com/slack-ruby/slack-ruby-bot-server/pull/176): Deps: bump mongoid-scroll to 2.0 - [@markokajzer](https://github.com/markokajzer).
78

89
### 2.1.1 (2023/07/25)
910

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ case ENV.fetch('DATABASE_ADAPTER', nil)
44
when 'mongoid' then
55
gem 'kaminari-mongoid'
66
gem 'mongoid', ENV['MONGOID_VERSION'] || '~> 7.3.0'
7-
gem 'mongoid-scroll', '~> 1.0.1'
7+
gem 'mongoid-scroll', '~> 2.0'
88
gem 'mongoid-shell'
99

1010
group :development, :test do

lib/slack-ruby-bot-server/api/helpers/cursor_helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def paginate_by_cursor(coll, _options)
1616
coll = coll.skip(params[:offset].to_i) if params.key?(:offset)
1717
size = (params[:size] || 10).to_i
1818
coll = coll.limit(size)
19-
coll.scroll(params[:cursor]) do |record, next_cursor|
19+
coll.scroll(params[:cursor]) do |record, iterator|
2020
results[:results] << record if record
21-
results[:next] = next_cursor.to_s
21+
results[:next] = iterator.next_cursor.to_s
2222
break if results[:results].count >= size
2323
end
2424
results[:total_count] = coll.count if params[:total_count] && coll.respond_to?(:count)

0 commit comments

Comments
 (0)