Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9dbd5b3c
Commit
9dbd5b3c
authored
Oct 24, 2016
by
Dmitriy Zaporozhets
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Change "Group#web_url" to return "/groups/twitter" rather than "/twitter"."
This reverts commit
c81ff152
.
parent
1a7ba2a5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
25 deletions
+16
-25
app/models/group.rb
app/models/group.rb
+1
-1
config/routes/group.rb
config/routes/group.rb
+15
-18
spec/models/group_spec.rb
spec/models/group_spec.rb
+0
-6
No files found.
app/models/group.rb
View file @
9dbd5b3c
...
@@ -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
...
...
config/routes/group.rb
View file @
9dbd5b3c
...
@@ -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
spec/models/group_spec.rb
View file @
9dbd5b3c
...
@@ -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
Alain Takoudjou
@alain.takoudjou
mentioned in commit
3be445c5
·
May 03, 2017
mentioned in commit
3be445c5
mentioned in commit 3be445c58e820035a7da6800beba6a13f3ca742f
Toggle commit list
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