公共贴吧,回复帖子上传附件时回复信息显示不完整:还有一点点被遮住。。

This commit is contained in:
sw 2014-09-18 11:00:15 +08:00
parent e1675c4009
commit ef78066f3e
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ module ApplicationHelper
# * :text - Link text (default to attachment filename) # * :text - Link text (default to attachment filename)
# * :download - Force download (default: false) # * :download - Force download (default: false)
def link_to_short_attachment(attachment, options={}) 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 route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path
html_options = options.slice!(:only_path) html_options = options.slice!(:only_path)
url = send(route_method, attachment, attachment.filename, options) url = send(route_method, attachment, attachment.filename, options)