diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-14 21:03:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-14 21:03:53 +0000 |
commit | 2230c11baa5c302af9850402b1d7c0734b8b39db (patch) | |
tree | 1f5355c612fe3b5549f917d331a9ccdf61c2475e /app/helpers/application_helper.rb | |
parent | 6ce28450c00483f0f6962d3e9022735cbe5b7903 (diff) | |
download | redmine-2230c11baa5c302af9850402b1d7c0734b8b39db.tar.gz redmine-2230c11baa5c302af9850402b1d7c0734b8b39db.zip |
Use named route with attachment filename for inline images.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11189 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d384ffa8b..cd5f60063 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -559,8 +559,7 @@ module ApplicationHelper filename, ext, alt, alttext = $1.downcase, $2, $3, $4 # search for the picture in attachments if found = Attachment.latest_attach(attachments, filename) - image_url = url_for :only_path => only_path, :controller => 'attachments', - :action => 'download', :id => found + image_url = download_named_attachment_path(found, found.filename, :only_path => only_path) desc = found.description.to_s.gsub('"', '') if !desc.blank? && alttext.blank? alt = " title=\"#{desc}\" alt=\"#{desc}\"" |