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:
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index aa53c0e0f3f..32b399ac461 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -9,6 +9,7 @@ class Label < ApplicationRecord
include Sortable
include FromUnion
include Presentable
+ include EachBatch
cache_markdown_field :description, pipeline: :single_line
@@ -66,6 +67,10 @@ class Label < ApplicationRecord
.with_preloaded_container
end
+ def self.pluck_titles
+ pluck(:title)
+ end
+
def self.prioritized(project)
joins(:priorities)
.where(label_priorities: { project_id: project })