Skip to content
Snippets Groups Projects
Commit 2d4ffce8 authored by Robert Speicher's avatar Robert Speicher
Browse files

Loosen help page parameter constraints for category

parent 3052e894
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -4,7 +4,7 @@ class HelpController < ApplicationController
 
def show
category = clean_path_info(path_params[:category])
file = clean_path_info(path_params[:file])
file = path_params[:file]
 
respond_to do |format|
format.any(:markdown, :md, :html) do
Loading
Loading
Loading
Loading
@@ -39,7 +39,7 @@ Gitlab::Application.routes.draw do
 
# Help
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/ui' => 'help#ui'
 
Loading
Loading
Loading
Loading
@@ -65,7 +65,7 @@ describe SnippetsController, "routing" do
end
 
# 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_ui GET /help/ui(.:format) help#ui
describe HelpController, "routing" do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment