summaryrefslogtreecommitdiff
path: root/config/routes/group.rb
diff options
context:
space:
mode:
authorAdam Niedzielski <adamsunday@gmail.com>2016-10-21 13:53:38 +0200
committerAdam Niedzielski <adamsunday@gmail.com>2016-10-21 13:53:38 +0200
commitc81ff152e08d58c13efbd50c40dd2e083ac65083 (patch)
tree685276faaa136fcbd3ae2bd2d52401d74ae1c35a /config/routes/group.rb
parent9df2115a4df5a964774128fdbbe1b3e695105536 (diff)
downloadgitlab-ce-c81ff152e08d58c13efbd50c40dd2e083ac65083.tar.gz
Change "Group#web_url" to return "/groups/twitter" rather than "/twitter".
Bring back the old behaviour which was changed by 6b90ccb9. Fixes #23527.
Diffstat (limited to 'config/routes/group.rb')
-rw-r--r--config/routes/group.rb33
1 files changed, 18 insertions, 15 deletions
diff --git a/config/routes/group.rb b/config/routes/group.rb
index 4838c9d91c6..826048ba196 100644
--- a/config/routes/group.rb
+++ b/config/routes/group.rb
@@ -12,23 +12,26 @@ constraints(GroupUrlConstrainer.new) do
end
end
-resources :groups, constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } do
- member do
- get :issues
- get :merge_requests
- get :projects
- get :activity
- end
-
- scope module: :groups do
- resources :group_members, only: [:index, :create, :update, :destroy], concerns: :access_requestable do
- post :resend_invite, on: :member
- delete :leave, on: :collection
+scope constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } do
+ resources :groups, except: [:show] do
+ member do
+ get :issues
+ get :merge_requests
+ get :projects
+ get :activity
end
- resource :avatar, only: [:destroy]
- resources :milestones, constraints: { id: /[^\/]+/ }, only: [:index, :show, :update, :new, :create]
+ scope module: :groups do
+ resources :group_members, only: [:index, :create, :update, :destroy], concerns: :access_requestable do
+ post :resend_invite, on: :member
+ delete :leave, on: :collection
+ end
- resources :labels, except: [:show], constraints: { id: /\d+/ }
+ resource :avatar, only: [:destroy]
+ resources :milestones, constraints: { id: /[^\/]+/ }, only: [:index, :show, :update, :new, :create]
+
+ resources :labels, except: [:show], constraints: { id: /\d+/ }
+ end
end
+ get 'groups/:id' => 'groups#show', as: :group_canonical
end