In a Rails 4 application labeled activeadmin (current main branch), I use Pundit for authorization. It works well for ressources, but I am unable to get it to work on pages.
Given for example:
ActiveAdmin.register_page "Home" do content do para "some text" end end
How do I allow it for a specific user?
After reading the Pundit readme, I tried using the following code, but it does not work.
class HomePolicy < Struct.new(:user, :home) def index? true end def show? true end end
Any idea?
source share