Skip to content

Commit aa019aa

Browse files
GCorbeldblock
andauthored
Fix typos
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
1 parent 9c20b52 commit aa019aa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ end
8989
Loop over the first records again.
9090

9191
```ruby
92-
Feed::Item.desc(:position).limit(5).scroll(saved_previous_cursor) do |record, iterator|
92+
Feed::Item.desc(:position).limit(5).scroll(saved_iterator.previous_cursor) do |record, iterator|
9393
# each record, one-by-one
9494
saved_iterator = iterator
9595
end
@@ -119,7 +119,7 @@ end
119119
Resume iterating using the previously saved cursor.
120120

121121
```ruby
122-
session[:feed_items].find.sort(position: -1).limit(5).scroll(iterator.next_cursor, { field_type: DateTime }) do |record, iterator|
122+
session[:feed_items].find.sort(position: -1).limit(5).scroll(saved_iterator.next_cursor, { field_type: DateTime }) do |record, iterator|
123123
# each record, one-by-one
124124
saved_iterator = iterator
125125
end

UPGRADING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Upgrading to >= 2.0.0
44

5-
The second argument passed to the block in `Mongoid::Criteria::Scrollable#scroll` and `Mongo::Scrollable#scroll` has changed. It is now an instance of `Mongoid::Criteria::Scrollable` that provides two methods: `next_cursor` and `previous_cursor`. The `next_cursor` method returns the same cursor as in versions prior to 2.0.0.
5+
The second argument yielded in the block in `Mongoid::Criteria::Scrollable#scroll` and `Mongo::Scrollable#scroll` has changed from a cursor to an instance of `Mongoid::Criteria::Scrollable` which provides `next_cursor` and `previous_cursor`. The `next_cursor` method returns the same cursor as in versions prior to 2.0.0.
66

77
For example, this code:
88

0 commit comments

Comments
 (0)