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

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -