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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
2d4ffce8
Commit
2d4ffce8
authored
Apr 15, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Loosen help page parameter constraints for category
parent
3052e894
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/help_controller.rb
app/controllers/help_controller.rb
+1
-1
config/routes.rb
config/routes.rb
+1
-1
spec/routing/routing_spec.rb
spec/routing/routing_spec.rb
+1
-1
No files found.
app/controllers/help_controller.rb
View file @
2d4ffce8
...
@@ -4,7 +4,7 @@ class HelpController < ApplicationController
...
@@ -4,7 +4,7 @@ class HelpController < ApplicationController
def
show
def
show
category
=
clean_path_info
(
path_params
[
:category
])
category
=
clean_path_info
(
path_params
[
:category
])
file
=
clean_path_info
(
path_params
[
:file
])
file
=
path_params
[
:file
]
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
any
(
:markdown
,
:md
,
:html
)
do
format
.
any
(
:markdown
,
:md
,
:html
)
do
...
...
config/routes.rb
View file @
2d4ffce8
...
@@ -39,7 +39,7 @@ Gitlab::Application.routes.draw do
...
@@ -39,7 +39,7 @@ Gitlab::Application.routes.draw do
# Help
# Help
get
'help'
=>
'help#index'
get
'help'
=>
'help#index'
get
'help/:category/:file'
=>
'help#show'
,
as: :help_page
,
constraints:
{
category:
/
[^\.]+/
,
file:
/[^
\.]+/
}
get
'help/:category/:file'
=>
'help#show'
,
as: :help_page
,
constraints:
{
category:
/
.*/
,
file:
/[^\/
\.]+/
}
get
'help/shortcuts'
get
'help/shortcuts'
get
'help/ui'
=>
'help#ui'
get
'help/ui'
=>
'help#ui'
...
...
spec/routing/routing_spec.rb
View file @
2d4ffce8
...
@@ -65,7 +65,7 @@ describe SnippetsController, "routing" do
...
@@ -65,7 +65,7 @@ describe SnippetsController, "routing" do
end
end
# help GET /help(.:format) help#index
# help GET /help(.:format) help#index
# help_page GET /help/:category/:file(.:format) help#show {:category=>/
[^\.]+/, :file=>/[^
\.]+/}
# help_page GET /help/:category/:file(.:format) help#show {:category=>/
.*/, :file=>/[^\/
\.]+/}
# help_shortcuts GET /help/shortcuts(.:format) help#shortcuts
# help_shortcuts GET /help/shortcuts(.:format) help#shortcuts
# help_ui GET /help/ui(.:format) help#ui
# help_ui GET /help/ui(.:format) help#ui
describe
HelpController
,
"routing"
do
describe
HelpController
,
"routing"
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