Skip to content

Commit bd41f68

Browse files
committed
Fix find_each options [ci skip]
1 parent d0ec2a9 commit bd41f68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/source/active_record_querying.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ end
317317

318318
The `find_each` method accepts most of the options allowed by the regular `find` method, except for `:order` and `:limit`, which are reserved for internal use by `find_each`.
319319

320-
Two additional options, `:batch_size` and `:begin_at`, are available as well.
320+
Three additional options, `:batch_size`, `:begin_at` and `:end_at`, are available as well.
321321

322322
**`:batch_size`**
323323

@@ -348,7 +348,7 @@ Another example would be if you wanted multiple workers handling the same proces
348348
Similar to the `:begin_at` option, `:end_at` allows you to configure the last ID of the sequence whenever the highest ID is not the one you need.
349349
This would be useful, for example, if you wanted to run a batch process, using a subset of records based on `:begin_at` and `:end_at`
350350

351-
For example, to send newsletters only to users with the primary key starting from 2000 up to 10000 and to retrieve them in batches of 1000:
351+
For example, to send newsletters only to users with the primary key starting from 2000 up to 10000 and to retrieve them in batches of 5000:
352352

353353
```ruby
354354
User.find_each(begin_at: 2000, end_at: 10000, batch_size: 5000) do |user|

0 commit comments

Comments
 (0)