From bcf635278377e6f670b43e8d4f550e2e1faee216 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sat, 5 Jul 2025 22:10:19 +0000 Subject: [PATCH] Do not add attribute "icon" to attachment elements when the icon option is passed (#42953). git-svn-id: https://svn.redmine.org/redmine/trunk@23862 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 790506c34..ab418fb38 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -128,7 +128,7 @@ module ApplicationHelper # * :download - Force download (default: false) def link_to_attachment(attachment, options={}) text = options.delete(:text) || attachment.filename - icon = options.fetch(:icon, false) + icon = options.delete(:icon) if options.delete(:download) route_method = :download_named_attachment_url