Permalink
Browse files

Shush deprecation warning due to initializing a Migrator with migrati…

…on paths rather than migrations. Use Migrator.open(paths) instead. Thanks @rubys!
  • Loading branch information...
1 parent d4333ed commit fe70cde87cb1c03f1e2fd9e6ffa0877deda589af @jeremy jeremy committed Dec 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/railties/databases.rake
@@ -167,7 +167,7 @@ db_namespace = namespace :db do
# desc "Raises an error if there are pending migrations"
task :abort_if_pending_migrations => [:environment, :load_config] do
- pending_migrations = ActiveRecord::Migrator.new(:up, ActiveRecord::Migrator.migrations_paths).pending_migrations
+ pending_migrations = ActiveRecord::Migrator.open(ActiveRecord::Migrator.migrations_paths).pending_migrations
if pending_migrations.any?
puts "You have #{pending_migrations.size} pending migrations:"

0 comments on commit fe70cde

Please sign in to comment.