summaryrefslogtreecommitdiff
path: root/config/routes
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-04-01 12:40:59 -0700
committerStan Hu <stanhu@gmail.com>2017-04-02 06:36:37 -0700
commit6811adafd5e98e1c058f6493072a66d74494387f (patch)
treeaf49066cb28a185d17ebefe4fe36898849743ebc /config/routes
parent9fc17f6f4abdb04f3cf1b60b87bd67b894a19c39 (diff)
downloadgitlab-ce-6811adafd5e98e1c058f6493072a66d74494387f.tar.gz
Relax constraint on Wiki IDs, since subdirectories can contain spacessh-relax-wiki-slug-constraint
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/routes')
-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