From 066ecf00372d2c161a7a200f1347ec3210768a9b Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Sat, 18 Aug 2012 11:10:06 -0400 Subject: Table#remove passed an array to remove_column, which is deprecated. See 02ca9151a043a4fefbb3f22edd05f0cd392fffaa --- .../active_record/connection_adapters/abstract/schema_definitions.rb | 2 +- activerecord/test/cases/migration_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index 132ca10f79..ddb6896257 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -391,7 +391,7 @@ module ActiveRecord # t.remove(:qualification) # t.remove(:qualification, :experience) def remove(*column_names) - @base.remove_column(@table_name, column_names) + @base.remove_column(@table_name, *column_names) end # Removes the given index from the table. diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index fb5eb2633b..f0c55b1535 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -1976,14 +1976,14 @@ if ActiveRecord::Base.connection.supports_migrations? def test_remove_drops_single_column with_change_table do |t| - @connection.expects(:remove_column).with(:delete_me, [:bar]) + @connection.expects(:remove_column).with(:delete_me, :bar) t.remove :bar end end def test_remove_drops_multiple_columns with_change_table do |t| - @connection.expects(:remove_column).with(:delete_me, [:bar, :baz]) + @connection.expects(:remove_column).with(:delete_me, :bar, :baz) t.remove :bar, :baz end end -- cgit v1.2.3