Skip to content
Browse files

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

  • Loading branch information...
1 parent 8d9d8bc commit c0fa4de65b32fc5e8251dafab1330f044d682a1e @wycats wycats committed
View
2 activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -327,6 +327,8 @@ def rename_column(table_name, column_name, new_column_name)
#
# 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)

0 comments on commit c0fa4de

Please sign in to comment.
Something went wrong with that request. Please try again.