diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-12-03 18:23:38 +0300 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-12-04 17:44:21 +0300 |
commit | 2674830e4df3f6509bd63ebfd048bc6a4e7053ab (patch) | |
tree | ddf982d821a7ce32d275f841f6ce3fb14f5a78a9 /app/serializers/label_entity.rb | |
parent | bba23151a1c0b4dff8f2c31301c5d0589876251d (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 |