summaryrefslogtreecommitdiffstats
path: root/app/helpers/attachments_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-26 19:34:33 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-26 19:34:33 +0000
commit1fcbeb6f816a70a3d14abd0f3519ef5d09bd7e66 (patch)
tree22a0c431952eb8283fe52af6ffd5b6198170f873 /app/helpers/attachments_helper.rb
parent454117a025122fbc103796077a843103df3fa41a (diff)
downloadredmine-1fcbeb6f816a70a3d14abd0f3519ef5d09bd7e66.tar.gz
redmine-1fcbeb6f816a70a3d14abd0f3519ef5d09bd7e66.zip
Use named routes or helpers.
git-svn-id: http://svn.redmine.org/redmine/trunk@13656 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/attachments_helper.rb')
-rw-r--r--app/helpers/attachments_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb
index a785c1528..d86fe0dbe 100644
--- a/app/helpers/attachments_helper.rb
+++ b/app/helpers/attachments_helper.rb
@@ -39,7 +39,7 @@ module AttachmentsHelper
api.filesize attachment.filesize
api.content_type attachment.content_type
api.description attachment.description
- api.content_url url_for(:controller => 'attachments', :action => 'download', :id => attachment, :filename => attachment.filename, :only_path => false)
+ api.content_url download_named_attachment_url(attachment, attachment.filename)
api.author(:id => attachment.author.id, :name => attachment.author.name) if attachment.author
api.created_on attachment.created_on
end