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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
b4217500
Commit
b4217500
authored
Jul 22, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call store_location_for once.
parent
9714061b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
app/controllers/sessions_controller.rb
app/controllers/sessions_controller.rb
+12
-10
No files found.
app/controllers/sessions_controller.rb
View file @
b4217500
class
SessionsController
<
Devise
::
SessionsController
def
new
if
request
.
referer
.
present?
redirect_url
=
if
request
.
referer
.
present?
referer_uri
=
URI
(
request
.
referer
)
if
referer_uri
.
host
==
Gitlab
.
config
.
gitlab
.
host
store_location_for
(
:redirect
,
referer_uri
.
path
)
referer_uri
.
path
else
store_location_for
(
:redirect
,
request
.
fullpath
)
request
.
fullpath
end
else
store_location_for
(
:redirect
,
request
.
fullpath
)
request
.
fullpath
end
store_location_for
(
:redirect
,
redirect_url
)
super
end
...
...
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