mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-15 21:29:33 +08:00
Make subject search more precise in global activities [SCI-3251]
This commit is contained in:
parent
5f663b3c74
commit
58af23e9b5
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…
Add table
Reference in a new issue