Can you get current_user permissions from a view or controller using can? in the following way:
<% if can? :update, @article %> <%= link_to "Edit", edit_article_path(@article) %> <% end %>
How can I access this function from the model using this syntax:
user.can?(:update, @article)
ruby-on-rails cancan
Tom Lehman Jul 20 '10 at 19:06 2010-07-20 19:06
source share