diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-05-25 18:50:02 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-05-25 18:50:02 +0000 |
commit | 3ba9702d74c1a89defbfad5fb8193023a3475c99 (patch) | |
tree | 7aee556300e94aa128c19e87e029963c65c0ddc2 /app/models | |
parent | b3b6c78112c97df32c406f7dd18031e540df3297 (diff) | |
parent | f565c4393efe1cadd05b22ae2fa7e36cee4d2793 (diff) | |
download | gitlab-ce-3ba9702d74c1a89defbfad5fb8193023a3475c99.tar.gz |
Merge branch 'winh-label-textcolor-default' into 'master'
Provide default for calculating label text color
Closes #32728
See merge request !11681
Diffstat (limited to 'app/models')
-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 |