Permalink
Browse files

Merge pull request #7388 from ManageIQ/fix_table_remove_passing_array…

…_deprecation

Table#remove passed an array to remove_column, which is deprecated.
  • Loading branch information...
2 parents 3c61642 + 066ecf0 commit b3bea4993896d9fb524a7c1f848fff6811e35297 @rafaelfranca rafaelfranca committed Aug 18, 2012
@@ -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.
@@ -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 b3bea49

Please sign in to comment.