summaryrefslogtreecommitdiff
path: root/app/models/label.rb
diff options
context:
space:
mode:
authorAlex Sanford <alex.sanford1@gmail.com>2017-04-28 12:11:53 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-04-28 12:11:53 +0000
commit85bb4d6b86bbfd3f5f6e98ac67394454ae81439e (patch)
tree932a57e588420fa71254cf119af9b35715d4596f /app/models/label.rb
parentf2d637f78c9c2fe14d716e58339856dd318c31c0 (diff)
downloadgitlab-ce-85bb4d6b86bbfd3f5f6e98ac67394454ae81439e.tar.gz
Add board_move slash command
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index d8b0e250732..ddddb6bdf8f 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -34,6 +34,7 @@ class Label < ActiveRecord::Base
scope :templates, -> { where(template: true) }
scope :with_title, ->(title) { where(title: title) }
+ scope :on_project_boards, ->(project_id) { joins(lists: :board).merge(List.movable).where(boards: { project_id: project_id }) }
def self.prioritized(project)
joins(:priorities)