I'm trying to use the Pundit gem which lets you override the policy class in the controller like this
def create
@publication = find_publication # @publication.class => Post
authorize @publication, policy_class: PublicationPolicy
@publication.publish!
redirect_to @publication
end
I tried to override the policy class in the view as well like below but got an error unknown keyword: :policy_class
<% if policy(@publication, policy_class: PublicationPolicy).create? %>