mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-06 23:51:31 +00:00
Prevents calling #truncate on nil.
git-svn-id: http://svn.redmine.org/redmine/trunk@13897 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0bcd5be0a5
commit
93d270388b
@ -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…
x
Reference in New Issue
Block a user