search: refactor to pass in the current user explicitly.

This commit is contained in:
evazion
2022-09-22 04:16:28 -05:00
parent b56b6c554b
commit 88ac91f5f3
82 changed files with 233 additions and 280 deletions

View File

@@ -27,7 +27,7 @@ class PoolsController < ApplicationController
limit = params[:limit].presence || CurrentUser.user.per_page
search = search_params.presence || ActionController::Parameters.new(category: "series")
@pools = authorize Pool.search(search).paginate(params[:page], limit: limit, search_count: params[:search])
@pools = authorize Pool.search(search, CurrentUser.user).paginate(params[:page], limit: limit, search_count: params[:search])
respond_with(@pools)
end