Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fbdb4635
Commit
fbdb4635
authored
Dec 17, 2018
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deprecation: redirect_to :back is deprecated
parent
bf38936f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+1
-1
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+1
-1
app/controllers/sherlock/transactions_controller.rb
app/controllers/sherlock/transactions_controller.rb
+1
-1
changelogs/unreleased/deprecated-redirect-back.yml
changelogs/unreleased/deprecated-redirect-back.yml
+5
-0
No files found.
app/controllers/admin/application_settings_controller.rb
View file @
fbdb4635
...
...
@@ -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
...
...
app/controllers/application_controller.rb
View file @
fbdb4635
...
...
@@ -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
...
...
app/controllers/sherlock/transactions_controller.rb
View file @
fbdb4635
...
...
@@ -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
changelogs/unreleased/deprecated-redirect-back.yml
0 → 100644
View file @
fbdb4635
---
title
:
'
Fix
deprecation:
redirect_to
:back
is
deprecated'
merge_request
:
23943
author
:
Jasper Maes
type
:
other
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment