mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 03:59:51 +08:00
Merge pull request #3735 from aignatov-bio/ai-sci-6344-optimize-my-modules-tags-search
Update query for search tags [SCI-6344]
This commit is contained in:
commit
31d12bc739
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue