Skip to content
Insert multiple records in one INSERT statement
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
spec
.gitignore
MIT-LICENSE
README.rdoc
Rakefile

README.rdoc

MysqlMultiInsert

Insert multiple AR objects with one SQL INSERT statement.

Example

class MyClass < ActiveRecord::Base
  include MysqlMultiInsert
end

obj1 = MyClass.new
obj2 = MyClass.new

MyClass.multi_insert [obj1, obj2] #=> One insert statement

Copyright © 2009 Scott Taylor <scott@railsnewbie.com>, released under the MIT license

Something went wrong with that request. Please try again.