diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-08-03 11:35:35 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-08-03 11:35:50 +0200 |
commit | 0b9e43f9dd0bef980d72af81a562bd0e947eee8d (patch) | |
tree | dc607f1fda653cfdc89d82b33026253f0892a57e | |
parent | dc51460c34b185ec85cb27c69767878eeb02779a (diff) | |
download | gitlab-ci-truncate-fix.tar.gz |
Fix truncate_first_line if message is niltruncate-fix
-rw-r--r-- | app/helpers/commits_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 37a9f34..c212e8b 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -17,6 +17,6 @@ module CommitsHelper end def truncate_first_line(message, length = 50) - truncate(message.lines.first.chomp, length: length) + truncate(message.each_line.first.chomp, length: length) if message end end |