mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
(feat) search by username (#401)
This commit is contained in:
commit
50138ece51
@ -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