In a Rails 4 app with activeadmin gem (current master branch) I use Pundit for authorization. It works well for ressources but I don't manage to make it work for pages.
Given for example :
ActiveAdmin.register_page "Home" do
content do
para "some text"
end
end
How would I authorize it for specific user ?
By reading the Pundit readme I tried with 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 ?