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
4480bef1
Commit
4480bef1
authored
Jan 25, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dz-fix-group-canonical-route' into 'master'
Fix 500 error for Group#web_url method if nested group See merge request !8743
parents
8a9597fc
0d9e80c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
group.rb
config/routes/group.rb
+2
-4
group_spec.rb
spec/models/group_spec.rb
+6
-0
No files found.
config/routes/group.rb
View file @
4480bef1
...
...
@@ -19,13 +19,11 @@ end
scope
(
path:
'groups/*id'
,
controller: :groups
,
constraints:
{
id:
Gitlab
::
Regex
.
namespace_route_regex
})
do
constraints:
{
id:
Gitlab
::
Regex
.
namespace_route_regex
,
format:
/(html|json|atom)/
})
do
get
:edit
,
as: :edit_group
get
:issues
,
as: :issues_group
get
:merge_requests
,
as: :merge_requests_group
get
:projects
,
as: :projects_group
get
:activity
,
as: :activity_group
get
'/'
,
action: :show
,
as: :group_canonical
end
# Must be last route in this file
get
'groups/*id'
=>
'groups#show'
,
as: :group_canonical
,
constraints:
{
id:
Gitlab
::
Regex
.
namespace_route_regex
}
spec/models/group_spec.rb
View file @
4480bef1
...
...
@@ -269,6 +269,12 @@ describe Group, models: true do
it
'returns the canonical URL'
do
expect
(
group
.
web_url
).
to
include
(
"groups/
#{
group
.
name
}
"
)
end
context
'nested group'
do
let
(
:nested_group
)
{
create
(
:group
,
:nested
)
}
it
{
expect
(
nested_group
.
web_url
).
to
include
(
"groups/
#{
nested_group
.
full_path
}
"
)
}
end
end
describe
'nested group'
do
...
...
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