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
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-09-07 12:27:48 +0300
committerDouwe Maan <douwe@gitlab.com>2015-09-07 12:27:48 +0300
commit662cf2cef40b97b983b85abb7d68b8a81b170bc3 (patch)
treeb3234b74551e0d5f57c4581dfeca225b0d39f8d5 /app/helpers
parentb9df4998607c64b758af641339edd40254900ecc (diff)
parentfbb891c8f3818b9aa17fadbb984ff7d33053c819 (diff)
Merge branch 'fix-wiki-page-history' into 'master'
Fix broken Wiki Page History This MR fixes the broken Page History on the Wiki pages. It turns out `WikiHelper` did not allow users to view different versions due to its omitting of query string parameters, which was necessary to specify different `version_id` parameters. Instead of this hacky approach, use manually-specified wildcard routes that match the ID field properly for slashes. Closes #2104 Closes #1751 Closes #1592 Closes https://github.com/gitlabhq/gitlabhq/issues/9399 See merge request !1232
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/wiki_helper.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb
deleted file mode 100644
index f8a96516e61..00000000000
--- a/app/helpers/wiki_helper.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-module WikiHelper
- # Rails v4.1.9+ escapes all model IDs, converting slashes into %2F. The
- # only way around this is to implement our own path generators.
- def namespace_project_wiki_path(namespace, project, wiki_page, *args)
- slug =
- case wiki_page
- when Symbol
- wiki_page
- when String
- wiki_page
- else
- wiki_page.slug
- end
- namespace_project_path(namespace, project) + "/wikis/#{slug}"
- end
-
- def edit_namespace_project_wiki_path(namespace, project, wiki_page, *args)
- namespace_project_wiki_path(namespace, project, wiki_page) + '/edit'
- end
-
- def history_namespace_project_wiki_path(namespace, project, wiki_page, *args)
- namespace_project_wiki_path(namespace, project, wiki_page) + '/history'
- end
-end