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:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-06-12 15:40:02 +0300
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-06-28 13:28:18 +0300
commit9da107f00bd17a525064f415ec0dcfd92b4907a0 (patch)
treea6a0bad291fe43adc1afc5e147d7292174cf77a0
parentd20079f439a5b7180cfae8726c409fae436d1ae7 (diff)
refactors Project#search namespace join
-rw-r--r--app/models/project.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 1176bec8873..298ba512a3b 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -377,6 +377,7 @@ class Project < ActiveRecord::Base
.or(ptable[:description].matches(pattern))
)
+
namespaces = unscoped.select(:id)
.joins(:namespace)
.where(ntable[:name].matches(pattern))