aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2016-12-06 11:04:36 +1030
committerGitHub <noreply@github.com>2016-12-06 11:04:36 +1030
commit5ff0d828f1f39b894a4b6752bddc5b3b96a61ec1 (patch)
tree35a31da4668089d81c3051209a7de856d9e52f2a /activerecord/lib/active_record/connection_adapters/abstract
parentd19528c0b6740b857bf10f9e8ca58de940b279ad (diff)
parent30b498036fe35ff9acb698dbc7364e289161113d (diff)
downloadrails-5ff0d828f1f39b894a4b6752bddc5b3b96a61ec1.tar.gz
rails-5ff0d828f1f39b894a4b6752bddc5b3b96a61ec1.tar.bz2
rails-5ff0d828f1f39b894a4b6752bddc5b3b96a61ec1.zip
Merge pull request #26687 from kamipo/fix_add_index_to_normalize_options
Fix `add_index` to normalize column names and options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb1
1 files changed, 1 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 25e8c51115..5623257fe8 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -1175,6 +1175,7 @@ module ActiveRecord
if order = options[:order]
case order
when Hash
+ order = order.symbolize_keys
quoted_columns.each { |name, column| column << " #{order[name].upcase}" if order[name].present? }
when String
quoted_columns.each { |name, column| column << " #{order.upcase}" if order.present? }