@@ -397,7 +397,7 module ApplicationHelper | |||
|
397 | 397 | end |
|
398 | 398 | |
|
399 | 399 | def truncate_single_line_raw(string, length) |
|
400 | string.truncate(length).gsub(%r{[\r\n]+}m, ' ') | |
|
400 | string.to_s.truncate(length).gsub(%r{[\r\n]+}m, ' ') | |
|
401 | 401 | end |
|
402 | 402 | |
|
403 | 403 | # Truncates at line break after 250 characters or options[:length] |
General Comments 0
You need to be logged in to leave comments.
Login now