declarative authorization - rails - declarative_authorization permitted_to not working correctly -
i trying use permitted_to hide/show links in 1 of forms not appearing.
the form belongs assignments actual edit function candidates.
<% if permitted_to? :edit, @candidate %> <%= link_to 'edit', edit_candidate_path(@candidate) %> <% end %>
i can navigate page url know not authorization issue.
any ideas ?
thanks, alex
sorry, found in documentation!
<%= link_to 'edit', edit_contact_path(contact) if permitted_to? :update, contact %>
Comments
Post a Comment