From 56dcc5f1637e7e2b50faf4f955d7ab6eb0f63cdd Mon Sep 17 00:00:00 2001 From: Adam Niedzielski Date: Fri, 21 Oct 2016 11:08:33 +0200 Subject: Change "Group#web_url" to return "/groups/twitter" rather than "/twitter". Bring back the old behaviour which was changed by 6b90ccb9. Fixes #23527. --- app/models/group.rb | 2 +- config/routes/group.rb | 1 + spec/models/group_spec.rb | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/models/group.rb b/app/models/group.rb index 00a595d2705..6865e610718 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -68,7 +68,7 @@ class Group < Namespace end def web_url - Gitlab::Routing.url_helpers.group_url(self) + Gitlab::Routing.url_helpers.group_canonical_url(self) end def human_name diff --git a/config/routes/group.rb b/config/routes/group.rb index 4838c9d91c6..6e081252200 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -13,6 +13,7 @@ constraints(GroupUrlConstrainer.new) do end resources :groups, constraints: { id: /[a-zA-Z.0-9_\-]+(?