提交 348b9824 编写于 作者: T Thiago Pinto

using Model.all.find_each in rails 3 raises an error and should not be recommended

上级 0435d0eb
......@@ -11,7 +11,7 @@ module Batches
# The #find_each method uses #find_in_batches with a batch size of 1000 (or as
# specified by the +:batch_size+ option).
#
# Person.all.find_each do |person|
# Person.find_each do |person|
# person.do_awesome_stuff
# end
#
......@@ -50,7 +50,7 @@ def find_each(options = {})
# end
#
# # Let's process the next 2000 records
# Person.all.find_in_batches(start: 2000, batch_size: 2000) do |group|
# Person.find_in_batches(start: 2000, batch_size: 2000) do |group|
# group.each { |person| person.party_all_night! }
# end
def find_in_batches(options = {})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册