summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/application_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 0a6af7da6..783cd7758 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -397,7 +397,7 @@ module ApplicationHelper
end
def truncate_single_line_raw(string, length)
- string.truncate(length).gsub(%r{[\r\n]+}m, ' ')
+ string.to_s.truncate(length).gsub(%r{[\r\n]+}m, ' ')
end
# Truncates at line break after 250 characters or options[:length]