mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Allow :name to be a Symbol (was this removed by accident?)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user