Commit 77adf81e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix tests

parent 69cb277993d2
......@@ -183,7 +183,12 @@ def active
end
def search(query)
joins(:namespace).where("projects.archived = ?", false).where("LOWER(projects.name) LIKE :query OR LOWER(projects.path) LIKE :query OR LOWER(namespaces.name) LIKE :query OR LOWER(projects.description) LIKE :query", query: "%#{query.downcase}%")
joins(:namespace).where("projects.archived = ?", false).
where("LOWER(projects.name) LIKE :query OR
LOWER(projects.path) LIKE :query OR
LOWER(namespaces.name) LIKE :query OR
LOWER(projects.description) LIKE :query",
query: "%#{query.try(:downcase)}%")
end
def search_by_title(query)
......
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