aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/active_record_querying.textile
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2009-03-13 09:29:37 +0100
committerXavier Noria <fxn@hashref.com>2009-03-13 09:29:37 +0100
commit60644467527bf2ffb45148b80f572a11a73f6e56 (patch)
treed67208d5f9aa851a908d6c72a6c6eebcd28f2d87 /railties/guides/source/active_record_querying.textile
parent8ac0e631046664b18349b3be32d8f7ba1ffdbdd7 (diff)
downloadrails-60644467527bf2ffb45148b80f572a11a73f6e56.tar.gz
rails-60644467527bf2ffb45148b80f572a11a73f6e56.tar.bz2
rails-60644467527bf2ffb45148b80f572a11a73f6e56.zip
explains the order in which records are fetched by find_each
Diffstat (limited to 'railties/guides/source/active_record_querying.textile')
-rw-r--r--railties/guides/source/active_record_querying.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile
index c902e457d4..f66947e47d 100644
--- a/railties/guides/source/active_record_querying.textile
+++ b/railties/guides/source/active_record_querying.textile
@@ -809,7 +809,7 @@ To be able to iterate over big sets of rows like that Active Record provides +fi
Behind the scenes +find_each+ fetches rows in batches of 1000 and yields them one by one. The size of the underlying batches is configurable via the +:batch_size+ option.
-The +:start+ option allows you to configure the first ID of the sequence if the lowest is not the one you need. This may be useful for example to be able to resume an interrupted batch process if it saves the last processed ID as a checkpoint.
+Records are fetched in ascending order on the primary key, which must be an integer. The +:start+ option allows you to configure the first ID of the sequence if the lowest is not the one you need. This may be useful for example to be able to resume an interrupted batch process if it saves the last processed ID as a checkpoint.
+find_each+ accepts the same options as +find+ except for +:order+ and +:limit+. Those two are needed internally and if the options argument include any of them an exception is raised.