search: refactor to pass in the current user explicitly.
This commit is contained in:
@@ -37,8 +37,8 @@ class Pool < ApplicationRecord
|
||||
order(updated_at: :desc)
|
||||
end
|
||||
|
||||
def search(params)
|
||||
q = search_attributes(params, :id, :created_at, :updated_at, :is_deleted, :name, :description, :post_ids, :dtext_links)
|
||||
def search(params, current_user)
|
||||
q = search_attributes(params, [:id, :created_at, :updated_at, :is_deleted, :name, :description, :post_ids, :dtext_links], current_user: current_user)
|
||||
|
||||
if params[:post_tags_match]
|
||||
q = q.post_tags_match(params[:post_tags_match])
|
||||
|
||||
Reference in New Issue
Block a user