Commit 9dbd5b3c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Revert "Change "Group#web_url" to return "/groups/twitter" rather than "/twitter"."

This reverts commit c81ff152.
parent 1a7ba2a5
...@@ -68,7 +68,7 @@ class Group < Namespace ...@@ -68,7 +68,7 @@ class Group < Namespace
end end
def web_url def web_url
Gitlab::Routing.url_helpers.group_canonical_url(self) Gitlab::Routing.url_helpers.group_url(self)
end end
def human_name def human_name
......
...@@ -12,8 +12,7 @@ constraints(GroupUrlConstrainer.new) do ...@@ -12,8 +12,7 @@ constraints(GroupUrlConstrainer.new) do
end end
end end
scope constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } do resources :groups, constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } do
resources :groups, except: [:show] do
member do member do
get :issues get :issues
get :merge_requests get :merge_requests
...@@ -32,6 +31,4 @@ scope constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } do ...@@ -32,6 +31,4 @@ scope constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } do
resources :labels, except: [:show], constraints: { id: /\d+/ } resources :labels, except: [:show], constraints: { id: /\d+/ }
end end
end
get 'groups/:id' => 'groups#show', as: :group_canonical
end end
...@@ -265,10 +265,4 @@ describe Group, models: true do ...@@ -265,10 +265,4 @@ describe Group, models: true do
members members
end end
describe '#web_url' do
it 'returns the canonical URL' do
expect(group.web_url).to include("groups/#{group.name}")
end
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment