From 685631285f21e2f63b1ecbdb1495f25c97b6bf41 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Thu, 4 Jul 2013 09:49:03 +0200 Subject: [PATCH] Remove deprecated String constructor from `ActiveRecord::Migrator`. --- activerecord/CHANGELOG.md | 4 ++++ activerecord/lib/active_record/migration.rb | 3 --- activerecord/test/cases/migrator_test.rb | 6 ------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 5a8876c282..a471b93f3c 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated String constructor from `ActiveRecord::Migrator`. + + *Yves Senn* + * Remove deprecated `scope` use without passing a callable object. *Arun Agrawal* diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index e96c347f6f..d3f33b907a 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -869,9 +869,6 @@ module ActiveRecord if Array(migrations).grep(String).empty? @migrations = migrations - else - ActiveSupport::Deprecation.warn "instantiate this class with a list of migrations" - @migrations = self.class.migrations(migrations) end validate(@migrations) diff --git a/activerecord/test/cases/migrator_test.rb b/activerecord/test/cases/migrator_test.rb index b5a69c4a92..3f9854200d 100644 --- a/activerecord/test/cases/migrator_test.rb +++ b/activerecord/test/cases/migrator_test.rb @@ -91,12 +91,6 @@ module ActiveRecord assert_equal 'AddExpressions', migrations[0].name end - def test_deprecated_constructor - assert_deprecated do - ActiveRecord::Migrator.new(:up, MIGRATIONS_ROOT + "/valid") - end - end - def test_relative_migrations list = Dir.chdir(MIGRATIONS_ROOT) do ActiveRecord::Migrator.migrations("valid/")