code layout clean up link_to_attachment of application helper

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7856 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-11-20 00:10:18 +00:00
parent 66d6d611ba
commit 5eb388b851
1 changed files with 4 additions and 2 deletions

View File

@ -97,8 +97,10 @@ module ApplicationHelper
def link_to_attachment(attachment, options={})
text = options.delete(:text) || attachment.filename
action = options.delete(:download) ? 'download' : 'show'
link_to(h(text), {:controller => 'attachments', :action => action, :id => attachment, :filename => attachment.filename }, options)
link_to(h(text),
{:controller => 'attachments', :action => action,
:id => attachment, :filename => attachment.filename },
options)
end
# Generates a link to a SCM revision