diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-06 03:35:01 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-06 03:35:01 +0000 |
commit | 8934e790fe43721f8b9d55745869362d521df3bb (patch) | |
tree | c3ceb49c8cc0af3600b407779947b2d2059f93d6 /app | |
parent | 16211f9a5bf6b4fa6c067bd4e447b6e466013ab6 (diff) | |
download | redmine-8934e790fe43721f8b9d55745869362d521df3bb.tar.gz redmine-8934e790fe43721f8b9d55745869362d521df3bb.zip |
Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at ApplicationHelper#format_activity_description
git-svn-id: http://svn.redmine.org/redmine/trunk@12835 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9c2a622ac..25096a11d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -232,7 +232,7 @@ module ApplicationHelper end def format_activity_description(text) - h(truncate(text.to_s, :length => 120).gsub(%r{[\r\n]*<(pre|code)>.*$}m, '...') + h(text.to_s.truncate(120).gsub(%r{[\r\n]*<(pre|code)>.*$}m, '...') ).gsub(/[\r\n]+/, "<br />").html_safe end |