diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-11-02 02:07:37 +0300 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-11-06 19:33:55 +0300 |
commit | 8c126525faba40032244328187ba73a53b6eaf4c (patch) | |
tree | 8ad62c67ea0cd29e0a4592083e759ba6b7383cdc /app/serializers/label_entity.rb | |
parent | c6d4449f33b57a90d78b3f739ccecc5ab8588e96 (diff) |
Extract code into IssueBoardEntity
Diffstat (limited to 'app/serializers/label_entity.rb')
-rw-r--r-- | app/serializers/label_entity.rb | 4 |
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 |