Accept array of field names

This commit is contained in:
Jim Menard 2009-02-05 14:24:20 -05:00
parent 0049756491
commit 8ef393437c
1 changed files with 1 additions and 0 deletions

View File

@ -108,6 +108,7 @@ module XGen
# Create a new index named +index_name+. +fields+ should be an array
# of field names.
def create_index(name, *fields)
fields = *fields if fields.kind_of?(Array) && fields.length == 1
@db.create_index(@name, name, fields)
end