diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-03-26 12:16:01 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-03-26 12:16:01 +0300 |
commit | ef6b3e0271d226462bed5f899f3964cf5652978c (patch) | |
tree | 191638ae3a0ffbdf71290dc5f29c4aa868a0ea2f /app/controllers/projects/wikis_controller.rb | |
parent | 1a9d80a139ea8de53fe32b7685daa696c1becbd0 (diff) |
Introduce #find_sidebar and use a constant to find the page
Diffstat (limited to 'app/controllers/projects/wikis_controller.rb')
-rw-r--r-- | app/controllers/projects/wikis_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb index cfb7d6fd941..cd7feaaf398 100644 --- a/app/controllers/projects/wikis_controller.rb +++ b/app/controllers/projects/wikis_controller.rb @@ -107,7 +107,7 @@ class Projects::WikisController < Projects::ApplicationController # Call #wiki to make sure the Wiki Repo is initialized @project_wiki.wiki - @sidebar_page = @project_wiki.find_page('_sidebar', params[:version_id]) + @sidebar_page = @project_wiki.find_sidebar(params[:version_id]) unless @sidebar_page # Fallback to default sidebar @sidebar_wiki_entries = WikiPage.group_by_directory(@project_wiki.pages(limit: 15)) |