From f38c54655a2756d3e4aa3437527b39d7521f0c11 Mon Sep 17 00:00:00 2001 From: Markus Kahl Date: Wed, 2 Dec 2015 08:28:17 +0000 Subject: [PATCH] there's only download left --- lib/open_project/object_linking.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/open_project/object_linking.rb b/lib/open_project/object_linking.rb index c940958202..dbd2c5f0f7 100644 --- a/lib/open_project/object_linking.rb +++ b/lib/open_project/object_linking.rb @@ -67,12 +67,11 @@ module OpenProject # * :download - Force download (default: false) def link_to_attachment(attachment, options = {}) text = options.delete(:text) || attachment.filename - action = options.delete(:download) ? 'download' : 'show' only_path = options.delete(:only_path) { true } link_to h(text), { controller: '/attachments', - action: action, + action: 'download', id: attachment, filename: attachment.filename, host: Setting.host_name,