From: Tom Hughes Date: Mon, 11 Jan 2021 20:04:13 +0000 (+0000) Subject: Restore ruby 2.5 compatibility X-Git-Tag: live~2385 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/b7d6243affd4ca09c076847135f9f801ed33a426 Restore ruby 2.5 compatibility --- diff --git a/.rubocop.yml b/.rubocop.yml index 200ab8a00..9b7a28d87 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,7 +6,7 @@ require: - rubocop-rails AllCops: - TargetRubyVersion: 2.7 + TargetRubyVersion: 2.5 NewCops: enable Exclude: - 'vendor/**/*' diff --git a/config/initializers/oauth.rb b/config/initializers/oauth.rb index c89778551..2e2f45ab8 100644 --- a/config/initializers/oauth.rb +++ b/config/initializers/oauth.rb @@ -35,12 +35,12 @@ module OpenStreetMap module ClassMethods def included(controller) controller.class_eval do - def self.before_filter(...) - before_action(...) + def self.before_filter(*names, &blk) + before_action(*names, &blk) end - def self.skip_before_filter(...) - skip_before_action(...) + def self.skip_before_filter(*names, &blk) + skip_before_action(*names, &blk) end end