From 21a8785b60233833f9457ace94eb785d912edad5 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 10 Dec 2021 12:03:09 +0100 Subject: [PATCH] Update query for search tags [SCI-6344] --- app/controllers/my_module_tags_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/my_module_tags_controller.rb b/app/controllers/my_module_tags_controller.rb index 2c28c3be3..912d2d290 100644 --- a/app/controllers/my_module_tags_controller.rb +++ b/app/controllers/my_module_tags_controller.rb @@ -114,10 +114,10 @@ class MyModuleTagsController < ApplicationController end def search_tags - assigned_tags = @my_module.my_module_tags.pluck(:tag_id) + assigned_tags = @my_module.my_module_tags.select(:tag_id) all_tags = @my_module.experiment.project.tags tags = all_tags.where.not(id: assigned_tags) - .search(current_user, false, params[:query]) + .where_attributes_like(:name, params[:query]) .select(:id, :name, :color) .limit(6)