mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-27 09:13:46 +08:00
Merge pull request #1610 from okriuchykhin/ok_SCI_3251
Make subject search more precise in global activities [SCI-3251]
This commit is contained in:
commit
913bdd91be
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ class GlobalActivitiesController < ApplicationController
|
||||||
results = {}
|
results = {}
|
||||||
subject_types.each do |subject|
|
subject_types.each do |subject|
|
||||||
matched = subject.constantize
|
matched = subject.constantize
|
||||||
.search_by_name(current_user, teams, query)
|
.search_by_name(current_user, teams, query, whole_phrase: true)
|
||||||
.limit(Constants::SEARCH_LIMIT)
|
.limit(Constants::SEARCH_LIMIT)
|
||||||
.pluck(:id, :name)
|
.pluck(:id, :name)
|
||||||
next if matched.length.zero?
|
next if matched.length.zero?
|
||||||
|
|
Loading…
Reference in a new issue