Nitpicking.

This commit is contained in:
Douwe Maan
2015-02-16 20:10:15 +01:00
parent 7d5f86f6cb
commit ebd39fc082
+3 -2
View File
@@ -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!