summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-06-12 13:40:02 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-06-28 11:28:18 +0100
commit9da107f00bd17a525064f415ec0dcfd92b4907a0 (patch)
treea6a0bad291fe43adc1afc5e147d7292174cf77a0
parentd20079f439a5b7180cfae8726c409fae436d1ae7 (diff)
downloadgitlab-ce-9da107f00bd17a525064f415ec0dcfd92b4907a0.tar.gz
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))