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]+/, "
").html_safe end