I\'m trying to figure out how to use pundit in my Rails 4 app.
I have a profile view in which I want to display a link to create a new project, subject to pundit authori
Usually I will use another class, say ViewPolicy, for the purpose in view:
class ViewPolicy < Struct.new(:user, :views)
    def items_index?
        user.has_role?(:sales)
    end
end
So I can do something like this:
<% if policy(:views).items_index? %>
  <%= link_to("Items", items_path) %>
<% end %>
very similar to @Kieran Andrews