app/models/ability.rb in educode_sales-0.1.1 vs app/models/ability.rb in educode_sales-0.1.2

- old
+ new

@@ -4,17 +4,13 @@ def initialize(staff) # Define abilities for the passed in user here. For example: # # user ||= User.new # guest user (not logged in) alias_action :index, :trends, :show, :to => :read - p "----------" - p staff.is_admin if staff.is_admin can :manage, :all else staff.role.permissions.each do |ps| - p ps.action - p "EducodeSales::#{ps.subject}".constantize can ps.action.to_sym, "EducodeSales::#{ps.subject}".constantize # level = @current_admin.role.role_areas.find_by(clazz: 'name')&.level # if level == '自己' # can ps.action.to_sym, "EducodeSales::#{ps.subject}".constantize, staff_id: staff.id # elsif level == '区域'