diff options
author | Alex Sanford <alex.sanford1@gmail.com> | 2017-04-28 15:11:53 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-28 15:11:53 +0300 |
commit | 85bb4d6b86bbfd3f5f6e98ac67394454ae81439e (patch) | |
tree | 932a57e588420fa71254cf119af9b35715d4596f /app/models | |
parent | f2d637f78c9c2fe14d716e58339856dd318c31c0 (diff) |
Add board_move slash command
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/label.rb | 1 |
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) |