mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
Allow searching by username
This commit is contained in:
parent
c6f0b69b2e
commit
1bd97e3251
@ -54,7 +54,8 @@ class Members::ListService
|
||||
.where("users.is_active = 'true'")
|
||||
.limit(50)
|
||||
query.downcase.split(' ').each do |word|
|
||||
members = members.where('lower(f_unaccent(profiles.first_name)) ~ :search OR ' \
|
||||
members = members.where('lower(f_unaccent(users.username)) ~ :search OR ' \
|
||||
'lower(f_unaccent(profiles.first_name)) ~ :search OR ' \
|
||||
'lower(f_unaccent(profiles.last_name)) ~ :search',
|
||||
search: word)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user