Epic

Some useful information about everything

Friday, April 19, 2013

Rails forgotten notes

For bulk data inserts within one transaction use:
  ActiveRecord::Base.transaction do
    SomeModel.create()...
  end

Posted by maki at 12:53 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2014 (12)
    • ►  December (3)
    • ►  November (1)
    • ►  October (1)
    • ►  September (1)
    • ►  August (5)
    • ►  March (1)
  • ▼  2013 (11)
    • ►  September (1)
    • ►  August (4)
    • ►  June (1)
    • ►  May (1)
    • ▼  April (1)
      • Rails forgotten notes
    • ►  February (1)
    • ►  January (2)
  • ►  2012 (7)
    • ►  December (2)
    • ►  October (1)
    • ►  May (2)
    • ►  April (2)
Watermark theme. Powered by Blogger.