summaryrefslogtreecommitdiff
path: root/app/models/label.rb
diff options
context:
space:
mode:
authorJohn Jarvis <jarv@gitlab.com>2019-04-02 10:12:32 +0200
committerJohn Jarvis <jarv@gitlab.com>2019-04-02 10:12:32 +0200
commit69b65a6b745e74bba290787420a0017395fd7c25 (patch)
treec328963cbe5b340c58c88230d21f338c77462ebd /app/models/label.rb
parent1b6fe3ae226e4c6f481c90c886e242fcd96ab11b (diff)
parent3e81a5baf25d6ecd9ad807a2b8f4238dcc598d5e (diff)
downloadgitlab-ce-69b65a6b745e74bba290787420a0017395fd7c25.tar.gz
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into jarv/dev-to-gitlab-2019-04-02jarv/dev-to-gitlab-2019-04-02
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 024daeb4fae..c7fff0d393e 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -133,6 +133,10 @@ class Label < ApplicationRecord
1
end
+ def self.by_ids(ids)
+ where(id: ids)
+ end
+
def open_issues_count(user = nil)
issues_count(user, state: 'opened')
end