diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-18 11:45:08 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-18 11:45:08 +0000 |
commit | 93d270388ba94556d84f789124a48f5eec6ae76c (patch) | |
tree | fc594e569b6227a592063eb10875392d251ecbfc /app/helpers | |
parent | 0bcd5be0a585e835b04e6e88e69a87d5d94daf45 (diff) | |
download | redmine-93d270388ba94556d84f789124a48f5eec6ae76c.tar.gz redmine-93d270388ba94556d84f789124a48f5eec6ae76c.zip |
Prevents calling #truncate on nil.
git-svn-id: http://svn.redmine.org/redmine/trunk@13897 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 2 |
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] |