Skip to content

Commit d7e31d9

Browse files
committed
fix: solve promatches search issue
1 parent 865e61c commit d7e31d9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/modules/competitive/controllers/pro_matches_controller.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,10 +557,11 @@ def apply_search(matches)
557557
# translate() maps special chars (Ø→O, æ→a, etc.) directly in PostgreSQL.
558558
matches.where(
559559
'lower(opponent_team_name) LIKE lower(:t) OR lower(our_team_name) LIKE lower(:t) ' \
560-
'OR lower(tournament_display) LIKE lower(:t) ' \
560+
'OR lower(tournament_name) LIKE lower(:t) OR lower(tournament_region) LIKE lower(:t) ' \
561561
'OR translate(lower(opponent_team_name), :from, :to) LIKE :n ' \
562562
'OR translate(lower(our_team_name), :from, :to) LIKE :n ' \
563-
'OR translate(lower(tournament_display), :from, :to) LIKE :n',
563+
'OR translate(lower(tournament_name), :from, :to) LIKE :n ' \
564+
'OR translate(lower(tournament_region), :from, :to) LIKE :n',
564565
t: "%#{term}%",
565566
n: "%#{norm_term}%",
566567
from: 'øæåðþ',

0 commit comments

Comments
 (0)