Allow :name to be a Symbol (was this removed by accident?)

This commit is contained in:
wycats
2010-08-03 12:22:10 -07:00
parent 8d9d8bc93c
commit c0fa4de65b

View File

@@ -327,6 +327,8 @@ module ActiveRecord
#
# Note: SQLite doesn't support index length
def add_index(table_name, column_name, options = {})
options[:name] = options[:name].to_s if options.key?(:name)
column_names = Array.wrap(column_name)
index_name = index_name(table_name, :column => column_names)