search: refactor to pass in the current user explicitly.
This commit is contained in:
@@ -56,8 +56,8 @@ class ForumPost < ApplicationRecord
|
||||
where(id: dtext_links).or(where(id: bur_links))
|
||||
end
|
||||
|
||||
def search(params)
|
||||
q = search_attributes(params, :id, :created_at, :updated_at, :is_deleted, :body, :creator, :updater, :topic, :dtext_links, :votes, :tag_alias, :tag_implication, :bulk_update_request)
|
||||
def search(params, current_user)
|
||||
q = search_attributes(params, [:id, :created_at, :updated_at, :is_deleted, :body, :creator, :updater, :topic, :dtext_links, :votes, :tag_alias, :tag_implication, :bulk_update_request], current_user: current_user)
|
||||
|
||||
if params[:linked_to].present?
|
||||
q = q.wiki_link_matches(params[:linked_to])
|
||||
|
||||
Reference in New Issue
Block a user