In the documentation I found this part:
<% permitted_to? :create, :employees do %>
<%= link_to 'New', new_employee_path %>
<% end %>
This is good, but I need to test, if the current user is admin, and if does, so then display some text... Something like
if admin?
I can get this information from associations, like:
if current_user.role == 0
but this is a bit dirty solution... support Declarative Authorization some cleaner and nicer way to do it?
This is what I have been looking for: