Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.
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 %>
|website framework question||2||397|
|E-commerce system. How do I add credit card? Does Visa prorvide a API?||4||419|
|Learning Ruby - write data to postgreSQL||2||421|
|Rails URL Rewrite||1||417|