summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-01-24 15:40:01 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-01-24 17:44:21 +0200
commit0d9e80c3ddedb5b56165dffa6cb248ee49091abf (patch)
treea447cc9307fdb8300c58ee066d5afef1812e242a /config
parenta89aab9c630593524b8a210746d2eb680ac5d102 (diff)
downloadgitlab-ce-0d9e80c3ddedb5b56165dffa6cb248ee49091abf.tar.gz
Fix 500 error for Group#web_url method if nested groupdz-fix-group-canonical-route
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'config')
-rw-r--r--config/routes/group.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/config/routes/group.rb b/config/routes/group.rb
index 776c31c9dac..60a1175fe80 100644
--- a/config/routes/group.rb
+++ b/config/routes/group.rb
@@ -19,13 +19,11 @@ end
scope(path: 'groups/*id',
controller: :groups,
- constraints: { id: Gitlab::Regex.namespace_route_regex }) do
+ constraints: { id: Gitlab::Regex.namespace_route_regex, format: /(html|json|atom)/ }) do
get :edit, as: :edit_group
get :issues, as: :issues_group
get :merge_requests, as: :merge_requests_group
get :projects, as: :projects_group
get :activity, as: :activity_group
+ get '/', action: :show, as: :group_canonical
end
-
-# Must be last route in this file
-get 'groups/*id' => 'groups#show', as: :group_canonical, constraints: { id: Gitlab::Regex.namespace_route_regex }