Added a simple check for a single array passed as the first and only parameter when inserting objects
This commit is contained in:
parent
cb62ae626b
commit
453d90a68e
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue