Loosen help page parameter constraints for category
This commit is contained in:
parent
3052e89420
commit
2d4ffce826
|
@ -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
|
||||||
|
|
|
@ -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'
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue