Commit 593b05ea authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Look for project description during search

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 1a20976a
...@@ -122,7 +122,7 @@ class Project < ActiveRecord::Base ...@@ -122,7 +122,7 @@ class Project < ActiveRecord::Base
end end
def search query def search query
joins(:namespace).where("projects.name LIKE :query OR projects.path LIKE :query OR namespaces.name LIKE :query", query: "%#{query}%") joins(:namespace).where("projects.name LIKE :query OR projects.path LIKE :query OR namespaces.name LIKE :query OR projects.description LIKE :query", query: "%#{query}%")
end end
def find_with_namespace(id) def find_with_namespace(id)
......
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