search: refactor to pass in the current user explicitly.
This commit is contained in:
@@ -33,8 +33,8 @@ class PoolVersion < ApplicationRecord
|
||||
where_ilike(:name, name)
|
||||
end
|
||||
|
||||
def search(params)
|
||||
q = search_attributes(params, :id, :created_at, :updated_at, :pool_id, :post_ids, :added_post_ids, :removed_post_ids, :updater_id, :description, :description_changed, :name, :name_changed, :version, :is_active, :is_deleted, :category)
|
||||
def search(params, current_user)
|
||||
q = search_attributes(params, [:id, :created_at, :updated_at, :pool_id, :post_ids, :added_post_ids, :removed_post_ids, :updater_id, :description, :description_changed, :name, :name_changed, :version, :is_active, :is_deleted, :category], current_user: current_user)
|
||||
|
||||
if params[:post_id]
|
||||
q = q.for_post_id(params[:post_id].to_i)
|
||||
|
||||
Reference in New Issue
Block a user