Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove deprecated String constructor from `ActiveRecord::Migrator`.

  • Loading branch information...
commit 685631285f21e2f63b1ecbdb1495f25c97b6bf41 1 parent c959110
@senny senny authored
View
4 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*
View
3  activerecord/lib/active_record/migration.rb
@@ -869,9 +869,6 @@ def initialize(direction, migrations, target_version = nil)
if Array(migrations).grep(String).empty?

I think the if clause can die together, just setting the @migrations variable now (otherwise it'd fail without that variable being defined anyway, right?)

@senny Owner
senny added a note

I agree. Will update it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@migrations = migrations
- else
- ActiveSupport::Deprecation.warn "instantiate this class with a list of migrations"
- @migrations = self.class.migrations(migrations)
end
validate(@migrations)
View
6 activerecord/test/cases/migrator_test.rb
@@ -91,12 +91,6 @@ def test_finds_migrations_in_numbered_directory
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/")
@carlosantoniodasilva

I think the if clause can die together, just setting the @migrations variable now (otherwise it'd fail without that variable being defined anyway, right?)

@senny

I agree. Will update it.

Please sign in to comment.
Something went wrong with that request. Please try again.