提交 fbdb4635 编写于 作者: J Jasper Maes

Fix deprecation: redirect_to :back is deprecated

上级 bf38936f
......@@ -77,7 +77,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
def reset_health_check_token
@application_setting.reset_health_check_access_token!
flash[:notice] = 'New health check access token has been generated!'
redirect_to :back
redirect_back_or_default
end
def clear_repository_check_states
......
......@@ -76,7 +76,7 @@ class ApplicationController < ActionController::Base
end
def redirect_back_or_default(default: root_path, options: {})
redirect_to request.referer.present? ? :back : default, options
redirect_back(fallback_location: default, **options)
end
def not_found
......
......@@ -15,7 +15,7 @@ module Sherlock
def destroy_all
Gitlab::Sherlock.collection.clear
redirect_to :back, status: :found
redirect_back_or_default(options: { status: :found })
end
end
end
---
title: 'Fix deprecation: redirect_to :back is deprecated'
merge_request: 23943
author: Jasper Maes
type: other
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册