diff options
author | Tim Connor <tim@wasabi.local> | 2010-09-27 11:56:18 +1300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-09-26 20:40:14 -0300 |
commit | d6f7b7d35337b87cc1c419e47fae52bbfc3f371e (patch) | |
tree | 0c9ed6eadd3ab2e791712d5131c243d825953db6 /activerecord/lib/active_record/connection_adapters | |
parent | 56de4e9a8090e2e617a0d478d38c0fccfce7d725 (diff) | |
download | rails-d6f7b7d35337b87cc1c419e47fae52bbfc3f371e.tar.gz rails-d6f7b7d35337b87cc1c419e47fae52bbfc3f371e.tar.bz2 rails-d6f7b7d35337b87cc1c419e47fae52bbfc3f371e.zip |
Fix remove_index issue when provided :name is a symbol
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 2 |
1 files changed, 1 insertions, 1 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 310423bb20..6c29e67e17 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -404,7 +404,7 @@ module ActiveRecord # as there's no way to determine the correct answer in that case. def index_name_exists?(table_name, index_name, default) return default unless respond_to?(:indexes) - indexes(table_name).detect { |i| i.name == index_name } + indexes(table_name).detect { |i| i.name == index_name.to_s } end # Returns a string of <tt>CREATE TABLE</tt> SQL statement(s) for recreating the |