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_link.rb')
-rw-r--r--app/models/label_link.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/label_link.rb b/app/models/label_link.rb
index 5ae1e88e14e..a466fe69300 100644
--- a/app/models/label_link.rb
+++ b/app/models/label_link.rb
@@ -9,4 +9,7 @@ class LabelLink < ApplicationRecord
validates :target, presence: true, unless: :importing?
validates :label, presence: true, unless: :importing?
+
+ scope :for_target, -> (target_id, target_type) { where(target_id: target_id, target_type: target_type) }
+ scope :with_remove_on_close_labels, -> { joins(:label).where(labels: { remove_on_close: true }) }
end