summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-02 21:38:50 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-02 21:38:50 -0800
commit647ff6240ef5e8256a44b126aa7573812d5e70b7 (patch)
treeb4a431759feb83b18eb88581b46b8e5321ff90fb /app/models/commit.rb
parent7d48205c1a472c07969e4dc43965fa3090b84376 (diff)
downloadgitlab-ce-647ff6240ef5e8256a44b126aa7573812d5e70b7.tar.gz
Rubocop: Style/ElseAlignment enabled
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb11
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)
- "&hellip;".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)
+ "&hellip;".html_safe << safe_message[80..-1]
+ else
+ safe_message.split("\n", 2)[1].try(:chomp)
+ end
end
def description?