Permalink
Browse files

Table#remove passed an array to remove_column, which is deprecated.

  • Loading branch information...
1 parent d6dbd7f commit 066ecf00372d2c161a7a200f1347ec3210768a9b @jrafanie jrafanie committed Aug 18, 2012
View
2 activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -391,7 +391,7 @@ def change_default(column_name, default)
# 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.
View
4 activerecord/test/cases/migration_test.rb
@@ -1976,14 +1976,14 @@ def test_change_default_changes_column
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

0 comments on commit 066ecf0

Please sign in to comment.