summaryrefslogtreecommitdiff
path: root/app/models/label.rb
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-04-20 17:00:12 +0100
committerPhil Hughes <me@iamphill.com>2016-04-20 17:00:12 +0100
commit75626d5f0134770065a18c73223bdd798866fa5b (patch)
treecc1d8bc6d2a674a0eb53fcf050afb3f92f077aae /app/models/label.rb
parenta845252983e4a0346c17e1b058c388f4c23a547d (diff)
downloadgitlab-ce-75626d5f0134770065a18c73223bdd798866fa5b.tar.gz
Label text color comes from JSON
Created issuable singleton to house the filtering
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index 55c01cae762..60bdce32952 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -113,6 +113,10 @@ class Label < ActiveRecord::Base
template
end
+ def text_color
+ LabelsHelper::text_color_for_bg(self.color)
+ end
+
private
def label_format_reference(format = :id)