search: refactor to pass in the current user explicitly.
This commit is contained in:
@@ -110,8 +110,8 @@ class SavedSearch < ApplicationRecord
|
||||
|
||||
concerning :Search do
|
||||
class_methods do
|
||||
def search(params)
|
||||
q = search_attributes(params, :id, :created_at, :updated_at, :query)
|
||||
def search(params, current_user)
|
||||
q = search_attributes(params, [:id, :created_at, :updated_at, :query], current_user: current_user)
|
||||
|
||||
if params[:label]
|
||||
q = q.labeled(params[:label])
|
||||
|
||||
Reference in New Issue
Block a user