From ef78066f3ebed1be0b8182d5ce0cc3deae6f66e4 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 18 Sep 2014 11:00:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=85=B1=E8=B4=B4=E5=90=A7=EF=BC=8C?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E5=B8=96=E5=AD=90=E4=B8=8A=E4=BC=A0=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E6=97=B6=E5=9B=9E=E5=A4=8D=E4=BF=A1=E6=81=AF=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=AE=8C=E6=95=B4:=E8=BF=98=E6=9C=89?= =?UTF-8?q?=E4=B8=80=E7=82=B9=E7=82=B9=E8=A2=AB=E9=81=AE=E4=BD=8F=E3=80=82?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f976918d8..cdb71170d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -127,7 +127,7 @@ module ApplicationHelper # * :text - Link text (default to attachment filename) # * :download - Force download (default: false) def link_to_short_attachment(attachment, options={}) - text = h(truncate(options.delete(:text) || attachment.filename, length: 25, omission: '...')) + text = h(truncate(options.delete(:text) || attachment.filename, length: 23, omission: '...')) route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path html_options = options.slice!(:only_path) url = send(route_method, attachment, attachment.filename, options)