1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

remove_index now uses quote_table_name() [#4300 state:resolved]

Signed-off-by: Michael Koziarski <michael@koziarski.com>
This commit is contained in:
Simon Effenberg 2010-03-31 01:24:44 +02:00 committed by Michael Koziarski
parent ebc80ea1cb
commit 4f1d0f6b7e

View file

@ -291,7 +291,7 @@ module ActiveRecord
# Remove the index named by_branch_party in the accounts table.
# remove_index :accounts, :name => :by_branch_party
def remove_index(table_name, options = {})
execute "DROP INDEX #{quote_column_name(index_name(table_name, options))} ON #{table_name}"
execute "DROP INDEX #{quote_column_name(index_name(table_name, options))} ON #{quote_table_name(table_name)}"
end
def index_name(table_name, options) #:nodoc: