Skip to content
This repository
Browse code

Update batches docs

  • Loading branch information...
commit 21123d3a7d4f87c9e61462248e3e5c7c7af1438f 1 parent 28e5341
Oscar Del Ben authored July 17, 2012
12  activerecord/lib/active_record/relation/batches.rb
@@ -9,8 +9,8 @@ module Batches
9 9
     # In that case, batch processing methods allow you to work
10 10
     # with the records in batches, thereby greatly reducing memory consumption.
11 11
     #
12  
-    # The <tt>find_each</tt> method uses <tt>find_in_batches</tt> with a batch size of 1000 (or as
13  
-    # specified by the <tt>:batch_size</tt> option).
  12
+    # The #find_each method uses #find_in_batches with a batch size of 1000 (or as
  13
+    # specified by the +:batch_size+ option).
14 14
     #
15 15
     #   Person.all.find_each do |person|
16 16
     #     person.do_awesome_stuff
@@ -20,7 +20,7 @@ module Batches
20 20
     #     person.party_all_night!
21 21
     #   end
22 22
     #
23  
-    #  You can also pass the <tt>:start</tt> option to specify
  23
+    #  You can also pass the +:start+ option to specify
24 24
     #  an offset to control the starting point.
25 25
     def find_each(options = {})
26 26
       find_in_batches(options) do |records|
@@ -29,14 +29,14 @@ def find_each(options = {})
29 29
     end
30 30
 
31 31
     # Yields each batch of records that was found by the find +options+ as
32  
-    # an array. The size of each batch is set by the <tt>:batch_size</tt>
  32
+    # an array. The size of each batch is set by the +:batch_size+
33 33
     # option; the default is 1000.
34 34
     #
35 35
     # You can control the starting point for the batch processing by
36  
-    # supplying the <tt>:start</tt> option. This is especially useful if you
  36
+    # supplying the +:start+ option. This is especially useful if you
37 37
     # want multiple workers dealing with the same processing queue. You can
38 38
     # make worker 1 handle all the records between id 0 and 10,000 and
39  
-    # worker 2 handle from 10,000 and beyond (by setting the <tt>:start</tt>
  39
+    # worker 2 handle from 10,000 and beyond (by setting the +:start+
40 40
     # option on that worker).
41 41
     #
42 42
     # It's not possible to set the order. That is automatically set to

0 notes on commit 21123d3

Please sign in to comment.
Something went wrong with that request. Please try again.