Forum: Ruby on Rails RE: Transactions and migrations (lots of records)???

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Campano, David (Guest)
on 2006-04-26 18:48
(Received via mailing list)
Oops, that code should have been...

maxcount = Order.count
(0..maxcount).step(100) { |i|
	transaction do
		orders = Order.find(:all, :limit => 100, :offset => i)
		## Then do processing here

This topic is locked and can not be replied to.