Added a simple check for a single array passed as the first and only parameter when inserting objects

This commit is contained in:
Adrian Madrid 2008-12-04 17:10:00 -07:00
parent cb62ae626b
commit 453d90a68e

View File

@ -32,6 +32,7 @@ module XGen
end
def insert(*objects)
objects = objects.first if objects.size == 1 && objects.first.is_a?(Array)
@db.insert_into_db(@name, objects)
end