aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-22 15:40:02 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-22 15:40:02 -0300
commit7196372a8ea01329fd49c5e71d392385f2b2e7e6 (patch)
treec68f1195eb8f180f86e0e20dc36aded18f2b73c1 /guides
parentd0ec2a98563a9591912bd1371b645c7ea21c57db (diff)
parentbd41f68f40d1f1849d863ff4c7b8404bbdf7aeb5 (diff)
downloadrails-7196372a8ea01329fd49c5e71d392385f2b2e7e6.tar.gz
rails-7196372a8ea01329fd49c5e71d392385f2b2e7e6.tar.bz2
rails-7196372a8ea01329fd49c5e71d392385f2b2e7e6.zip
Merge pull request #19862 from piton4eg/patch-2
Fix find_each options [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/active_record_querying.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md
index de976acd01..2f10bc4e7c 100644
--- a/guides/source/active_record_querying.md
+++ b/guides/source/active_record_querying.md
@@ -317,7 +317,7 @@ end
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`.
-Two additional options, `:batch_size` and `:begin_at`, are available as well.
+Three additional options, `:batch_size`, `:begin_at` and `:end_at`, are available as well.
**`:batch_size`**
@@ -348,7 +348,7 @@ Another example would be if you wanted multiple workers handling the same proces
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.
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`
-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:
+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:
```ruby
User.find_each(begin_at: 2000, end_at: 10000, batch_size: 5000) do |user|