Browse Source

Prevents calling #truncate on nil.

git-svn-id: http://svn.redmine.org/redmine/trunk@13897 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/3.0.0
Jean-Philippe Lang 9 years ago
parent
commit
93d270388b
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      app/helpers/application_helper.rb

+ 1
- 1
app/helpers/application_helper.rb View File

@@ -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]

Loading…
Cancel
Save