diff options
Diffstat (limited to 'app/finders/groups/accepting_group_transfers_finder.rb')
-rw-r--r-- | app/finders/groups/accepting_group_transfers_finder.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/finders/groups/accepting_group_transfers_finder.rb b/app/finders/groups/accepting_group_transfers_finder.rb index c95318d0098..e757ecff015 100644 --- a/app/finders/groups/accepting_group_transfers_finder.rb +++ b/app/finders/groups/accepting_group_transfers_finder.rb @@ -14,7 +14,9 @@ module Groups return Group.none unless can_transfer_group? items = find_all_groups - items = by_search(items) + + # Search will perform an ORDER BY to ensure exact matches are returned first. + return by_search(items, exact_matches_first: true) if params[:search].present? sort(items) end |