aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-01-19 15:06:05 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-01-19 15:06:05 +0900
commit6559577d1d3fdb16187eda124bb71dd48d217c9d (patch)
tree4922e030067368608d2335cf1236691a293d4114 /activerecord
parentfa17fcc32fa890b70a6bf292bbc391f62be2eaec (diff)
downloadrails-6559577d1d3fdb16187eda124bb71dd48d217c9d.tar.gz
rails-6559577d1d3fdb16187eda124bb71dd48d217c9d.tar.bz2
rails-6559577d1d3fdb16187eda124bb71dd48d217c9d.zip
Remove unused `connection` argument from `MigrationContext#current_version`
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/migration.rb6
1 files changed, 3 insertions, 3 deletions
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