From 6559577d1d3fdb16187eda124bb71dd48d217c9d Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 19 Jan 2018 15:06:05 +0900 Subject: Remove unused `connection` argument from `MigrationContext#current_version` --- activerecord/lib/active_record/migration.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index dab70b835a..798328233f 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -1062,7 +1062,7 @@ module ActiveRecord end end - def current_version(connection = nil) + def current_version get_all_versions.max || 0 rescue ActiveRecord::NoDatabaseError end @@ -1169,8 +1169,8 @@ module ActiveRecord end # For cases where a table doesn't exist like loading from schema cache - def current_version(connection = nil) - MigrationContext.new(migrations_paths).current_version(connection) + def current_version + MigrationContext.new(migrations_paths).current_version end end -- cgit v1.2.3