I want to skip the policy_scope requirement fro Pundit on one controller (home). I have tried this:
class ApplicationController < ActionController::Base
include Pundit
after_action :verify_authorized, :except => :index, unless: :devise_controller?
after_action :verify_policy_scoped, :only => :index, unless: controller.controller_name == "home"
end
class HomeController < ApplicationController
def index
redirect_to (new_user_session_path) unless user_signed_in?
if user_signed_in?
@user=current_user
end
end
end
But I don't think the controller is defined yet or something? Any thoughts or suggestions?