class MoviesController < ApplicationController def index allowed_movies = policy_scope(Movies) if params[:query].present? @infos = allowed_movies.search(params[:query]) else @infos = allowed_infos end end end # in the MoviesPolicyController : class Scope #[..] def resolve scope.all end end