mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-21 06:15:31 +08:00
make search for users case insensitive [fixes SCI-1192]
This commit is contained in:
parent
92159b734f
commit
615bbb9967
1 changed files with 3 additions and 1 deletions
|
@ -55,7 +55,9 @@ class Team < ActiveRecord::Base
|
|||
def search_users(query = nil)
|
||||
a_query = "%#{query}%"
|
||||
users.where.not(confirmed_at: nil)
|
||||
.where('full_name LIKE ? OR email LIKE ?', a_query, a_query)
|
||||
.where('lower(full_name) LIKE ? OR lower(email) LIKE ?',
|
||||
a_query.downcase,
|
||||
a_query.downcase)
|
||||
end
|
||||
|
||||
# Imports samples into db
|
||||
|
|
Loading…
Reference in a new issue