aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorSeamus Abshere <seamus@abshere.net>2012-02-14 09:34:11 -0600
committerSeamus Abshere <seamus@abshere.net>2012-02-14 09:34:11 -0600
commit602e038ac5f0f801fe110243557c8751c793bc0a (patch)
treeb6e3fc851003a0924585442a7cec2e9508a06e7d /activerecord/lib/active_record/connection_adapters
parentbbef7b012f8ef3ce9c92c553379a63814201e12f (diff)
downloadrails-602e038ac5f0f801fe110243557c8751c793bc0a.tar.gz
rails-602e038ac5f0f801fe110243557c8751c793bc0a.tar.bz2
rails-602e038ac5f0f801fe110243557c8751c793bc0a.zip
thanks to @jurriaan
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
index 9fc5973635..761e929fde 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -505,7 +505,7 @@ module ActiveRecord
execute_and_free("SHOW CREATE TABLE #{quote_table_name(table)}", 'SCHEMA') do |result|
create_table = each_hash(result).first[:"Create Table"]
if create_table.to_s =~ /PRIMARY KEY\s+\((.+)\)/
- keys = $1.split(",").map { |key| key.tr('`"', "") }
+ keys = $1.split(",").map { |key| key.delete('`"') }
keys.length == 1 ? [keys.first, nil] : nil
else
nil