We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
class Ability include CanCan::Ability def initialize(user, user_role) case (user_role) when 1: # administrator can :manage, :all when 2: # presbyter can :read, :all when 3: # secretary can :read, :all when 4: # area_pastor can :read, :all when 5: # coordinator can :read, :all when 6: # supervisor can :read, :all when 7: # leader can :read, :all when 8: # member can :read, :all when 9: # frequenter can :read, :all else # guest user, what TODO ?? end end end
<% if can? :update, ConfigMaster, current_user_role %> ... <% end %>
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Need a script to deploy to a java application server using Capistrano||2||437|
|in ruby How do I get input from the keyboard if I am in windows ?||6||498|
|Add a simple drop down from controller||5||384|
Join the community of 500,000 technology professionals and ask your questions.