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:
authorJarka Košanová <jarka@gitlab.com>2019-02-12 11:35:34 +0300
committerJarka Košanová <jarka@gitlab.com>2019-03-28 14:06:31 +0300
commit96153f2055dc0bcd2ee8b34a36f33529f6ccc50e (patch)
tree3ff4d56cedc85b600ae3c66bf0c851769fdbc4fd /app/models/label.rb
parentc29a92fc31acaefcc60abf1c9354d148ffc6985c (diff)
Check if labels are available for target issuable
- labels have to be in the same project/group as an issuable
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index 96bdb7f17c5..e13a2322c6b 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -133,6 +133,10 @@ class Label < ActiveRecord::Base
1
end
+ def self.by_ids(ids)
+ where(id: ids)
+ end
+
def open_issues_count(user = nil)
issues_count(user, state: 'opened')
end