BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c81ff152
Commit
c81ff152
authored
Oct 21, 2016
by
Adam Niedzielski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change "Group#web_url" to return "/groups/twitter" rather than "/twitter".
Bring back the old behaviour which was changed by
6b90ccb9
. Fixes #23527.
parent
9df2115a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
16 deletions
+25
-16
group.rb
app/models/group.rb
+1
-1
group.rb
config/routes/group.rb
+18
-15
group_spec.rb
spec/models/group_spec.rb
+6
-0
No files found.
app/models/group.rb
View file @
c81ff152
...
...
@@ -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
...
...
config/routes/group.rb
View file @
c81ff152
...
...
@@ -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
spec/models/group_spec.rb
View file @
c81ff152
...
...
@@ -265,4 +265,10 @@ describe Group, models: true do
members
end
describe
'#web_url'
do
it
'returns the canonical URL'
do
expect
(
group
.
web_url
).
to
include
(
"groups/
#{
group
.
name
}
"
)
end
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