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:
authorFelipe Artur <felipefac@gmail.com>2017-08-29 00:56:49 +0300
committerFelipe Artur <felipefac@gmail.com>2017-08-29 00:56:49 +0300
commitf2a43ff5b7eec188ffc470649bf40d268cbdce2a (patch)
treef9a59f5d83d883c482c9ebfe811580a0fc8f6be6 /app/models/label.rb
parent5f88660a3f5d9f0de0109a3da46e81ea9024c677 (diff)
Group boards CE backport
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb3
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)