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-12-03 18:23:38 +0300
committerBrett Walker <bwalker@gitlab.com>2018-12-04 17:44:21 +0300
commit2674830e4df3f6509bd63ebfd048bc6a4e7053ab (patch)
treeddf982d821a7ce32d275f841f6ce3fb14f5a78a9 /app/serializers/label_entity.rb
parentbba23151a1c0b4dff8f2c31301c5d0589876251d (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