Hi,
I want to create 1000 items at once(vouchers) in my db. My class name is Voucher. How can ik realize this...?
remco
Hi,
I want to create 1000 items at once(vouchers) in my db. My class name is Voucher. How can ik realize this...?
remco
Hey Remco,
What format is your input data in? Will this happen regularly or is this a one-time insert?
It sounds like you might want to look at ActiveRecord Extensions: http://github.com/zdennis/ar-extensions/tree/master
Regards, Gustav Paul
and there is always the obvious solution:
1000.times do Voucher.create(:attribute1 => 'value1') end