diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-06-08 04:23:59 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-06-08 04:23:59 +0000 |
commit | c1f17037e4b5575be4f9b49589945e4717e6f5ef (patch) | |
tree | 19d67bd2c40ddf98151da200e04d869b93ac5401 | |
parent | 80ba11a02944a675c44fa1e0f89729f86d502850 (diff) | |
download | redmine-c1f17037e4b5575be4f9b49589945e4717e6f5ef.tar.gz redmine-c1f17037e4b5575be4f9b49589945e4717e6f5ef.zip |
fix variable name confusion at AttachmentsController#thumbnail
This is suggested by Rails team.
https://github.com/rails/rails/issues/15471#issuecomment-45419147
git-svn-id: http://svn.redmine.org/redmine/trunk@13176 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/attachments_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 18f0e0d9e..b7f856a1a 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -61,9 +61,9 @@ class AttachmentsController < ApplicationController end def thumbnail - if @attachment.thumbnailable? && thumbnail = @attachment.thumbnail(:size => params[:size]) - if stale?(:etag => thumbnail) - send_file thumbnail, + if @attachment.thumbnailable? && tbnail = @attachment.thumbnail(:size => params[:size]) + if stale?(:etag => tbnail) + send_file tbnail, :filename => filename_for_content_disposition(@attachment.filename), :type => detect_content_type(@attachment), :disposition => 'inline' |