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:
authorMarin Jankovski <marin@gitlab.com>2014-05-05 13:55:49 +0400
committerMarin Jankovski <marin@gitlab.com>2014-05-05 13:55:49 +0400
commit4146e885dde2338b25c1a176ede2f5a2d0946f96 (patch)
tree28fdd3a4dcef0c4175f1baab4c521335f789741d /app/controllers/projects/wikis_controller.rb
parentcb69baedd335b0609503502080fc684520b3794c (diff)
Fix styling issues.
Diffstat (limited to 'app/controllers/projects/wikis_controller.rb')
-rw-r--r--app/controllers/projects/wikis_controller.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb
index 0eb9364eaa4..496064c9a65 100644
--- a/app/controllers/projects/wikis_controller.rb
+++ b/app/controllers/projects/wikis_controller.rb
@@ -12,19 +12,21 @@ class Projects::WikisController < Projects::ApplicationController
def show
@page = @project_wiki.find_page(params[:id], params[:version_id])
+ gollum_wiki = @project_wiki.wiki
+ file = gollum_wiki.file(params[:id], gollum_wiki.ref, true)
if @page
render 'show'
- elsif file = @project_wiki.wiki.file(params[:id], @project_wiki.wiki.ref, true)
+ elsif file
if file.on_disk?
- send_file file.on_disk_path, :disposition => 'inline'
+ send_file file.on_disk_path, disposition: 'inline'
else
- send_data(
- file.raw_data,
- type: file.mime_type,
- disposition: 'inline',
- filename: file.name
- )
+ send_data(
+ file.raw_data,
+ type: file.mime_type,
+ disposition: 'inline',
+ filename: file.name
+ )
end
else
return render('empty') unless can?(current_user, :write_wiki, @project)