diff options
author | wycats <wycats@gmail.com> | 2010-08-03 12:22:10 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-08-03 12:22:36 -0700 |
commit | c0fa4de65b32fc5e8251dafab1330f044d682a1e (patch) | |
tree | 614c33f49f0fa09360ecdce4f2edb744ea08ff73 /activerecord/lib/active_record/connection_adapters/abstract | |
parent | 8d9d8bc93cd603d76c39779a55142715d8153e88 (diff) | |
download | rails-c0fa4de65b32fc5e8251dafab1330f044d682a1e.tar.gz rails-c0fa4de65b32fc5e8251dafab1330f044d682a1e.tar.bz2 rails-c0fa4de65b32fc5e8251dafab1330f044d682a1e.zip |
Allow :name to be a Symbol (was this removed by accident?)
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index ffc3847a31..7dee68502f 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -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) |