diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-07-25 08:37:46 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-07-25 09:22:47 +0530 |
commit | 42a00f740b04555d9150f900145b4dd685000aaf (patch) | |
tree | ad5cf0a34ae31c1050baee5b65643a8939ead837 /app/views/layouts/project.html.haml | |
parent | 58178a4f0cfc388be0d2f97906bece56ac4c543c (diff) | |
download | gitlab-ce-42a00f740b04555d9150f900145b4dd685000aaf.tar.gz |
`WikiPage` should have a slug even when not persisted.fix-wiki-error-500
1. So we can build the markdown preview URL for it.
2. We can't skip the slug in this case, because the slug is used to
construct relative markdown URLs.
3. Add rspec feature tests to cover creating wiki pages with
spaces/hyphens in the name.
4. Add rspec feature tests for markdown preview URL rewriting, which was
only covered by unit tests up to this point.
Diffstat (limited to 'app/views/layouts/project.html.haml')
-rw-r--r-- | app/views/layouts/project.html.haml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 28cb6c56650..ee9c0366f2b 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -5,7 +5,7 @@ - content_for :scripts_body_top do - project = @target_project || @project - - if @project_wiki && @page && @page.slug.present? + - if @project_wiki && @page - markdown_preview_path = namespace_project_wiki_markdown_preview_path(project.namespace, project, @page.slug) - else - markdown_preview_path = markdown_preview_namespace_project_path(project.namespace, project) |