summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-14 21:13:09 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-14 21:13:09 +0000
commit1386c10074f97728c65c7693502668c1a56f4a0e (patch)
tree72fe853e87c264ed5b2972606a3f15923f3b4203 /app
parent2230c11baa5c302af9850402b1d7c0734b8b39db (diff)
downloadredmine-1386c10074f97728c65c7693502668c1a56f4a0e.tar.gz
redmine-1386c10074f97728c65c7693502668c1a56f4a0e.zip
Use helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11190 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_helper.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index cd5f60063..e181eea54 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -775,8 +775,7 @@ module ApplicationHelper
when 'attachment'
attachments = options[:attachments] || (obj && obj.respond_to?(:attachments) ? obj.attachments : nil)
if attachments && attachment = attachments.detect {|a| a.filename == name }
- link = link_to h(attachment.filename), {:only_path => only_path, :controller => 'attachments', :action => 'download', :id => attachment},
- :class => 'attachment'
+ link = link_to_attachment(attachment, :only_path => only_path, :download => true, :class => 'attachment')
end
when 'project'
if p = Project.visible.where("identifier = :s OR LOWER(name) = :s", :s => name.downcase).first