From 59841e5b681323837f975e03b4be8cd0bbc4bc97 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 30 Aug 2022 08:02:03 +0000 Subject: Remove extra call of Attachment#thumbnailable? in AttachmentsController#thumbnail (#37599). Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@21790 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/attachments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index aa8bbeec9..612e070d2 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -83,7 +83,7 @@ class AttachmentsController < ApplicationController end def thumbnail - if @attachment.thumbnailable? && tbnail = @attachment.thumbnail(:size => params[:size]) + if (tbnail = @attachment.thumbnail(:size => params[:size])) if stale?(:etag => tbnail, :template => false) send_file( tbnail, -- cgit v1.2.3