summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-04-06 05:45:04 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-04-06 05:45:04 +0000
commit8828c0f13e5ad1a434831ca611cd008b0c674aa2 (patch)
treeba801547e1c1e63a9130474c890a519baeba8976
parentf277f127c6e17743a2875344a62d758ac400e325 (diff)
downloadredmine-8828c0f13e5ad1a434831ca611cd008b0c674aa2.tar.gz
redmine-8828c0f13e5ad1a434831ca611cd008b0c674aa2.zip
fix attachment link has get parameter :class (#10602)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9327 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/application_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index ae10ee8f2..de252a864 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -97,9 +97,11 @@ module ApplicationHelper
def link_to_attachment(attachment, options={})
text = options.delete(:text) || attachment.filename
action = options.delete(:download) ? 'download' : 'show'
+ opt_only_path = {}
+ opt_only_path[:only_path] = (options[:only_path] == false ? false : true)
link_to(h(text),
{:controller => 'attachments', :action => action,
- :id => attachment, :filename => attachment.filename }.merge(options),
+ :id => attachment, :filename => attachment.filename}.merge(opt_only_path),
options)
end