Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2018-11-02 02:07:37 +0300
committerBrett Walker <bwalker@gitlab.com>2018-11-06 19:33:55 +0300
commit8c126525faba40032244328187ba73a53b6eaf4c (patch)
tree8ad62c67ea0cd29e0a4592083e759ba6b7383cdc /app/serializers/label_entity.rb
parentc6d4449f33b57a90d78b3f739ccecc5ab8588e96 (diff)
Extract code into IssueBoardEntity
Diffstat (limited to 'app/serializers/label_entity.rb')
-rw-r--r--app/serializers/label_entity.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/label_entity.rb b/app/serializers/label_entity.rb
index 98743d62b50..5082245dda9 100644
--- a/app/serializers/label_entity.rb
+++ b/app/serializers/label_entity.rb
@@ -12,4 +12,8 @@ class LabelEntity < Grape::Entity
expose :text_color
expose :created_at
expose :updated_at
+
+ expose :priority, if: -> (*) { options.key?(:project) } do |label|
+ label.priority(options[:project])
+ end
end