diff options
author | Matthew Draper <matthew@trebex.net> | 2014-09-12 21:24:38 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2014-09-12 21:24:38 +0930 |
commit | b259b06e73a44f87654d26759b0a679e1ecc069c (patch) | |
tree | 47e094b1c62d96431a1a45133983036d18cae66b /guides | |
parent | 516f431ab0618a052f53eb5b14e2c6204da244dd (diff) | |
parent | 2e51d6f917a0008350e5e84523fbe6cab1956851 (diff) | |
download | rails-b259b06e73a44f87654d26759b0a679e1ecc069c.tar.gz rails-b259b06e73a44f87654d26759b0a679e1ecc069c.tar.bz2 rails-b259b06e73a44f87654d26759b0a679e1ecc069c.zip |
Merge pull request #16893 from tanmay3011/docs
[ci skip] #find_in_batches doesn't support :include option
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_record_querying.md | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index cb243c95f5..e1a465c64f 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -340,16 +340,14 @@ The `find_in_batches` method is similar to `find_each`, since both retrieve batc ```ruby # Give add_invoices an array of 1000 invoices at a time -Invoice.find_in_batches(include: :invoice_lines) do |invoices| +Invoice.find_in_batches do |invoices| export.add_invoices(invoices) end ``` -NOTE: The `:include` option allows you to name associations that should be loaded alongside with the models. - ##### Options for `find_in_batches` -The `find_in_batches` method accepts the same `:batch_size` and `:start` options as `find_each`, as well as most of the options allowed by the regular `find` method, except for `:order` and `:limit`, which are reserved for internal use by `find_in_batches`. +The `find_in_batches` method accepts the same `:batch_size` and `:start` options as `find_each`. Conditions ---------- |