Posted By

strato1986 on 11/16/11


Tagged


Versions (?)

Bulk insert in database


 / Published in: Ruby
 

  1. ActiveRecord::Base.transaction do
  2. 100.times { Model.create(name: SecureRandom.base64(5)) }
  3. end

Report this snippet  

You need to login to post a comment.