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
iv
gitlab-ce
Commits
bcea7ba3
Commit
bcea7ba3
authored
Jun 07, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'namespace-route' into 'master'
Namespace route Fixes #1312
parents
0d13abb1
3dc0bce9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
app/controllers/namespaces_controller.rb
app/controllers/namespaces_controller.rb
+18
-0
config/routes.rb
config/routes.rb
+1
-1
No files found.
app/controllers/namespaces_controller.rb
0 → 100644
View file @
bcea7ba3
class
NamespacesController
<
ApplicationController
skip_before_filter
:authenticate_user!
def
show
namespace
=
Namespace
.
find_by
(
path:
params
[
:id
])
unless
namespace
return
render_404
end
if
namespace
.
type
==
"Group"
redirect_to
group_path
(
namespace
)
else
redirect_to
user_path
(
namespace
.
owner
)
end
end
end
config/routes.rb
View file @
bcea7ba3
...
@@ -315,7 +315,7 @@ Gitlab::Application.routes.draw do
...
@@ -315,7 +315,7 @@ Gitlab::Application.routes.draw do
end
end
end
end
get
':id'
=>
"
group
s#show"
,
constraints:
{
id:
/(?:[^.]|\.(?!atom$))+/
,
format:
/atom/
}
get
':id'
=>
"
namespace
s#show"
,
constraints:
{
id:
/(?:[^.]|\.(?!atom$))+/
,
format:
/atom/
}
root
to:
"dashboard#show"
root
to:
"dashboard#show"
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