Skip to content
Snippets Groups Projects
Commit 1aabfcb9 authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Change the user search query to be case insensitive.

parent 961d8793
No related branches found
No related tags found
No related merge requests found
v 6.8.0
- Ability to at mention users that are participating in issue and merge req. discussion
- Enabled GZip Compression for assets in example Nginx, make sure that Nginx is compiled with --with-http_gzip_static_module flag (this is default in Ubuntu)
- Make user search case-insensitive (Christopher Arnold)
 
v 6.7.2
- Fix upgrader script
Loading
Loading
Loading
Loading
@@ -204,7 +204,7 @@ class User < ActiveRecord::Base
end
 
def search query
where("name LIKE :query OR email LIKE :query OR username LIKE :query", query: "%#{query}%")
where("lower(name) LIKE :query OR lower(email) LIKE :query OR lower(username) LIKE :query", query: "%#{query.downcase}%")
end
 
def by_username_or_id(name_or_id)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment