From 58af23e9b51bc2ece752202cbafe71f26f539839 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Thu, 28 Mar 2019 17:03:05 +0100 Subject: [PATCH] Make subject search more precise in global activities [SCI-3251] --- app/controllers/global_activities_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/global_activities_controller.rb b/app/controllers/global_activities_controller.rb index de7513698..7f145b5d2 100644 --- a/app/controllers/global_activities_controller.rb +++ b/app/controllers/global_activities_controller.rb @@ -52,7 +52,7 @@ class GlobalActivitiesController < ApplicationController results = {} subject_types.each do |subject| matched = subject.constantize - .search_by_name(current_user, teams, query) + .search_by_name(current_user, teams, query, whole_phrase: true) .limit(Constants::SEARCH_LIMIT) .pluck(:id, :name) next if matched.length.zero?