I\'ve added the configuration pundit addapter authorization to my application
config.authorization_adapter = ActiveAdmin::PunditAdapter
Wh
I found the answer!
After adding these two lines to the active admin initializer file
config.authorization_adapter = ActiveAdmin::PunditAdapter
#this line sets the default policy to application_policy.rb
config.pundit_default_policy = "ApplicationPolicy"
I had to add this to dashboard.rb under app/admin/dashboard.rb
def index
authorize :dashboards, :index?
end
Then I created a file in my policies folder called dashboard_policy.rb and added this code
class DashboardPolicy < ApplicationPolicy
def dashboard?
true
end
def index?
true
end
end
That got it working!