diff options
author | winh <winnie@gitlab.com> | 2017-05-24 14:37:55 +0200 |
---|---|---|
committer | winh <winnie@gitlab.com> | 2017-05-25 19:08:37 +0200 |
commit | f565c4393efe1cadd05b22ae2fa7e36cee4d2793 (patch) | |
tree | b3315a3bcf1e9e1f05346ea69036ba3277804d8f /app/models/label.rb | |
parent | e63d27d83bdf9c07776c18ebc297d75728aa7e29 (diff) | |
download | gitlab-ce-f565c4393efe1cadd05b22ae2fa7e36cee4d2793.tar.gz |
Provide default for calculating label text color (!11681)
Diffstat (limited to 'app/models/label.rb')
-rw-r--r-- | app/models/label.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/label.rb b/app/models/label.rb index ddddb6bdf8f..074239702f8 100644 --- a/app/models/label.rb +++ b/app/models/label.rb @@ -133,6 +133,10 @@ class Label < ActiveRecord::Base template end + def color + super || DEFAULT_COLOR + end + def text_color LabelsHelper.text_color_for_bg(self.color) end |