search: refactor to pass in the current user explicitly.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user