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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
9714061b
Commit
9714061b
authored
Jul 21, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If the referer is not set, use fullpath.
parent
cfde0936
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
app/controllers/sessions_controller.rb
app/controllers/sessions_controller.rb
+8
-1
features/steps/project/redirects.rb
features/steps/project/redirects.rb
+1
-0
No files found.
app/controllers/sessions_controller.rb
View file @
9714061b
...
@@ -2,7 +2,14 @@ class SessionsController < Devise::SessionsController
...
@@ -2,7 +2,14 @@ class SessionsController < Devise::SessionsController
def
new
def
new
if
request
.
referer
.
present?
if
request
.
referer
.
present?
store_location_for
(
:redirect
,
URI
(
request
.
referer
).
path
)
referer_uri
=
URI
(
request
.
referer
)
if
referer_uri
.
host
==
Gitlab
.
config
.
gitlab
.
host
store_location_for
(
:redirect
,
referer_uri
.
path
)
else
store_location_for
(
:redirect
,
request
.
fullpath
)
end
else
store_location_for
(
:redirect
,
request
.
fullpath
)
end
end
super
super
...
...
features/steps/project/redirects.rb
View file @
9714061b
...
@@ -17,6 +17,7 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
...
@@ -17,6 +17,7 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
end
end
step
'I should see project "Community" home page'
do
step
'I should see project "Community" home page'
do
Gitlab
.
config
.
gitlab
.
stub
(
:host
).
and_return
(
"www.example.com"
)
within
'.project-home-title'
do
within
'.project-home-title'
do
page
.
should
have_content
'Community'
page
.
should
have_content
'Community'
end
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