Commit 9da107f0 authored by Tiago Botelho's avatar Tiago Botelho

refactors Project#search namespace join

parent d20079f4
...@@ -377,6 +377,7 @@ class Project < ActiveRecord::Base ...@@ -377,6 +377,7 @@ class Project < ActiveRecord::Base
.or(ptable[:description].matches(pattern)) .or(ptable[:description].matches(pattern))
) )
namespaces = unscoped.select(:id) namespaces = unscoped.select(:id)
.joins(:namespace) .joins(:namespace)
.where(ntable[:name].matches(pattern)) .where(ntable[:name].matches(pattern))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment