1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove unused connection argument from MigrationContext#current_version

This commit is contained in:
Ryuta Kamizono 2018-01-19 15:06:05 +09:00
parent fa17fcc32f
commit 6559577d1d

View file

@ -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