search: refactor to pass in the current user explicitly.
This commit is contained in:
@@ -21,8 +21,8 @@ class PostReplacement < ApplicationRecord
|
||||
|
||||
concerning :Search do
|
||||
class_methods do
|
||||
def search(params = {})
|
||||
q = search_attributes(params, :id, :created_at, :updated_at, :md5, :old_md5, :file_ext, :old_file_ext, :original_url, :replacement_url, :creator, :post)
|
||||
def search(params, current_user)
|
||||
q = search_attributes(params, [:id, :created_at, :updated_at, :md5, :old_md5, :file_ext, :old_file_ext, :original_url, :replacement_url, :creator, :post], current_user: current_user)
|
||||
q.apply_default_order(params)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user