diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-02 21:38:50 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-02 21:38:50 -0800 |
commit | 647ff6240ef5e8256a44b126aa7573812d5e70b7 (patch) | |
tree | b4a431759feb83b18eb88581b46b8e5321ff90fb /app/models/commit.rb | |
parent | 7d48205c1a472c07969e4dc43965fa3090b84376 (diff) | |
download | gitlab-ce-647ff6240ef5e8256a44b126aa7573812d5e70b7.tar.gz |
Rubocop: Style/ElseAlignment enabled
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index baccf286740..e0461809e10 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -88,11 +88,12 @@ class Commit # cut off, ellipses (`&hellp;`) are prepended to the commit message. def description title_end = safe_message.index("\n") - @description ||= if (!title_end && safe_message.length > 100) || (title_end && title_end > 100) - "…".html_safe << safe_message[80..-1] - else - safe_message.split("\n", 2)[1].try(:chomp) - end + @description ||= + if (!title_end && safe_message.length > 100) || (title_end && title_end > 100) + "…".html_safe << safe_message[80..-1] + else + safe_message.split("\n", 2)[1].try(:chomp) + end end def description? |