File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
lib/slack-ruby-bot-server/api/helpers Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ case ENV.fetch('DATABASE_ADAPTER', nil)
4
4
when 'mongoid' then
5
5
gem 'kaminari-mongoid'
6
6
gem 'mongoid' , ENV [ 'MONGOID_VERSION' ] || '~> 7.3.0'
7
- gem 'mongoid-scroll' , '~> 1.0.1 '
7
+ gem 'mongoid-scroll' , '~> 2.0 '
8
8
gem 'mongoid-shell'
9
9
10
10
group :development , :test do
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ def paginate_by_cursor(coll, _options)
16
16
coll = coll . skip ( params [ :offset ] . to_i ) if params . key? ( :offset )
17
17
size = ( params [ :size ] || 10 ) . to_i
18
18
coll = coll . limit ( size )
19
- coll . scroll ( params [ :cursor ] ) do |record , next_cursor |
19
+ coll . scroll ( params [ :cursor ] ) do |record , iterator |
20
20
results [ :results ] << record if record
21
- results [ :next ] = next_cursor . to_s
21
+ results [ :next ] = iterator . next_cursor . to_s
22
22
break if results [ :results ] . count >= size
23
23
end
24
24
results [ :total_count ] = coll . count if params [ :total_count ] && coll . respond_to? ( :count )
You can’t perform that action at this time.
0 commit comments