mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 19:53:19 +08:00
Use where_attributes like in team search [SCI-5099]
This commit is contained in:
parent
fe06effbd7
commit
3cb395db15
1 changed files with 1 additions and 1 deletions
|
@ -166,7 +166,7 @@ module Users
|
|||
.where('user_teams.role': UserTeam.roles[:admin])
|
||||
.distinct
|
||||
|
||||
teams = teams.where('name ILIKE ?', "%#{params[:query]}%") if params[:query].present?
|
||||
teams = teams.where_attributes_like(:name, params[:query]) if params[:query].present?
|
||||
|
||||
teams.select { |team| can_invite_team_users?(team) }
|
||||
|
||||
|
|
Loading…
Reference in a new issue