BigW Consortium Gitlab

Case-insensetive search autocomplete for projets

parent 757e92d5
...@@ -139,7 +139,7 @@ class Project < ActiveRecord::Base ...@@ -139,7 +139,7 @@ class Project < ActiveRecord::Base
end end
def search_by_title query 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 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