Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-04-01 22:40:59 +0300
committerStan Hu <stanhu@gmail.com>2017-04-02 16:36:37 +0300
commit6811adafd5e98e1c058f6493072a66d74494387f (patch)
treeaf49066cb28a185d17ebefe4fe36898849743ebc /config
parent9fc17f6f4abdb04f3cf1b60b87bd67b894a19c39 (diff)
Relax constraint on Wiki IDs, since subdirectories can contain spaces
If a subdirectory contains spaces, GitLab would be unable to generate the route in the sidebar, resulting in an Error 500. Closes #30357
Diffstat (limited to 'config')
-rw-r--r--config/routes/wiki.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/config/routes/wiki.rb b/config/routes/wiki.rb
index a6b3f5d4693..c2da84ff6f2 100644
--- a/config/routes/wiki.rb
+++ b/config/routes/wiki.rb
@@ -1,5 +1,3 @@
-WIKI_SLUG_ID = { id: /\S+/ }.freeze unless defined? WIKI_SLUG_ID
-
scope(controller: :wikis) do
scope(path: 'wikis', as: :wikis) do
get :git_access
@@ -8,7 +6,7 @@ scope(controller: :wikis) do
post '/', to: 'wikis#create'
end
- scope(path: 'wikis/*id', as: :wiki, constraints: WIKI_SLUG_ID, format: false) do
+ scope(path: 'wikis/*id', as: :wiki, format: false) do
get :edit
get :history
post :preview_markdown