diff options
| author | Izaak Alpert <ialpert@blackberry.com> | 2013-10-24 11:16:14 -0400 |
|---|---|---|
| committer | Izaak Alpert <ialpert@blackberry.com> | 2013-10-24 11:23:26 -0400 |
| commit | 0f87ae3be5d7d1bc0a3728f43ae0465005b68b92 (patch) | |
| tree | 3b782b6196317329d3b3a52f568306e24769f4d5 /app/models | |
| parent | cddec75dc1e309483aa80ea4533ff972507686ef (diff) | |
| download | gitlab-ce-0f87ae3be5d7d1bc0a3728f43ae0465005b68b92.tar.gz | |
Allow searching by namespace name, include public projects
GITLAB-1457 (GITLAB-836)
Change-Id: If8e2474bc6908accca51f395f58937687f101b58
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index d2dcf26ac69..6b8e54d5b22 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -122,7 +122,7 @@ class Project < ActiveRecord::Base end def search query - where("projects.name LIKE :query OR projects.path LIKE :query", query: "%#{query}%") + joins(:namespace).where("projects.name LIKE :query OR projects.path LIKE :query OR namespaces.name LIKE :query", query: "%#{query}%") end def find_with_namespace(id) |
