aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-18 08:32:26 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-18 08:32:26 -0700
commitb3bea4993896d9fb524a7c1f848fff6811e35297 (patch)
treebcbd0556eac8f050790815ab4d65673d16611aa4 /activerecord
parent3c61642b35a8afbd06af0dc8ccb030504a8563cb (diff)
parent066ecf00372d2c161a7a200f1347ec3210768a9b (diff)
downloadrails-b3bea4993896d9fb524a7c1f848fff6811e35297.tar.gz
rails-b3bea4993896d9fb524a7c1f848fff6811e35297.tar.bz2
rails-b3bea4993896d9fb524a7c1f848fff6811e35297.zip
Merge pull request #7388 from ManageIQ/fix_table_remove_passing_array_deprecation
Table#remove passed an array to remove_column, which is deprecated.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb2
-rw-r--r--activerecord/test/cases/migration_test.rb4
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