Model#each in rails 2.3 rc2
Finally! I’ve been close to doing this myself, but never got around to it.
So, as I just learned in rails 2.3 extras railscast, you can now do
1 2 3 |
Product.each(:batch_size => 10) do |product # stuff on 1 product at a time end |
This makes me happy.
March 09, 2009
