aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2006-01-31 14:31:16 +0000
committerMarcel Molina <marcel@vernix.org>2006-01-31 14:31:16 +0000
commit2bf3fa076e822da1e55064ca7e9409af3fe52841 (patch)
tree4d441426e1cfc12bb7b82d0e90c6c8fbe90a254f /activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
parentd2adec438e2f70ea1228cefb5d592752cf720ac2 (diff)
downloadrails-2bf3fa076e822da1e55064ca7e9409af3fe52841.tar.gz
rails-2bf3fa076e822da1e55064ca7e9409af3fe52841.tar.bz2
rails-2bf3fa076e822da1e55064ca7e9409af3fe52841.zip
Support the :column option for remove_index with the PostgreSQL adapter. Closes #3661.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index fbb978e034..066a71fab6 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -325,13 +325,7 @@ module ActiveRecord
end
def remove_index(table_name, options) #:nodoc:
- if Hash === options
- index_name = options[:name]
- else
- index_name = "#{table_name}_#{options}_index"
- end
-
- execute "DROP INDEX #{index_name}"
+ execute "DROP INDEX #{index_name(table_name, options)}"
end