RE: Transactions and migrations (lots of records)?

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs