app/models/ability.rb in adminpanel-2.2.5 vs app/models/ability.rb in adminpanel-2.3.0

- old
+ new

@@ -3,13 +3,13 @@ include Adminpanel::ApplicationHelper def initialize(user) if user.nil? - elsif user.rol.name == 'Admin' + elsif user.role.name == 'Admin' can :manage, :all else - user.rol.permissions.each do |permission| + user.role.permissions.each do |permission| if permission.to_read? can :read, symbol_class(permission.resource) elsif permission.to_publish? can :publish, symbol_class(permission.resource) elsif permission.to_create?