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
This commit is contained in:
1 parent
4ebdcf13db
commit
6ce28450c0
3 files changed
+9
-3
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user