BigW Consortium Gitlab

Case-insensetive search autocomplete for projets

parent 757e92d5
......@@ -139,7 +139,7 @@ class Project < ActiveRecord::Base
end
def search_by_title query
where("projects.archived = ?", false).where("projects.name LIKE :query", query: "%#{query}%")
where("projects.archived = ?", false).where("LOWER(projects.name) LIKE :query", query: "%#{query.downcase}%")
end
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