From ebd39fc082b09177e0777e5de5729c3f98495e87 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Mon, 16 Feb 2015 18:42:52 +0100 Subject: Nitpicking. --- app/controllers/files_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/controllers/files_controller.rb') diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 561af8084c3..15523cbc2e7 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -5,9 +5,10 @@ class FilesController < ApplicationController if uploader.file_storage? if can?(current_user, :read_project, note.project) - disposition = uploader.image? ? 'inline' : 'attachment' # Replace old notes location in /public with the new one in / and send the file - path = uploader.file.path.gsub("#{Rails.root}/public",Rails.root.to_s) + path = uploader.file.path.gsub("#{Rails.root}/public", Rails.root.to_s) + + disposition = uploader.image? ? 'inline' : 'attachment' send_file path, disposition: disposition else not_found! -- cgit v1.2.1