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)
44when '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
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments