diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-14 20:51:49 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-14 20:51:49 +0000 |
commit | 6ce28450c00483f0f6962d3e9022735cbe5b7903 (patch) | |
tree | 26eb528f15fc646c8e7fa4a522f65a6aff92f675 /app | |
parent | 4ebdcf13db34186bb562ed523c637dd6edc86682 (diff) | |
download | redmine-6ce28450c00483f0f6962d3e9022735cbe5b7903.tar.gz redmine-6ce28450c00483f0f6962d3e9022735cbe5b7903.zip |
Adds a named route for thumbnails and use route helper in #thumbnail_tag.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11188 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2a06ad926..d384ffa8b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -160,8 +160,8 @@ module ApplicationHelper end def thumbnail_tag(attachment) - link_to image_tag(url_for(:controller => 'attachments', :action => 'thumbnail', :id => attachment)), - {:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename}, + link_to image_tag(thumbnail_path(attachment)), + named_attachment_path(attachment, attachment.filename), :title => attachment.filename end |