diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-08-28 18:56:49 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-08-28 18:56:49 -0300 |
commit | f2a43ff5b7eec188ffc470649bf40d268cbdce2a (patch) | |
tree | f9a59f5d83d883c482c9ebfe811580a0fc8f6be6 /app/models/label.rb | |
parent | 5f88660a3f5d9f0de0109a3da46e81ea9024c677 (diff) | |
download | gitlab-ce-f2a43ff5b7eec188ffc470649bf40d268cbdce2a.tar.gz |
Group boards CE backport
Diffstat (limited to 'app/models/label.rb')
-rw-r--r-- | app/models/label.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/label.rb b/app/models/label.rb index 674bb3f2720..7fb017f9b0c 100644 --- a/app/models/label.rb +++ b/app/models/label.rb @@ -34,7 +34,8 @@ 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 }) } + scope :with_lists_and_board, -> { joins(lists: :board).merge(List.movable) } + scope :on_project_boards, ->(project_id) { with_lists_and_board.where(boards: { project_id: project_id }) } def self.prioritized(project) joins(:priorities) |