app/models/devise_authorizable/ability.rb
# Create abilities for each role in the given array.
# This simply tries to call a method on the ability object with the same
# name as the role. The role methods are called in the order they are
# defined in the ability class. Remember to put low priority roles before
# higher priority roles. This allows higher roles to overwrite behaviour
# of lower roles.
# https://github.com/ryanb/cancan/wiki/Ability-Precedence
Create abilities for each role in the given array.
This simply tries to call a method on the ability object with the same
name as the role. The role methods are called in the order they are
defined in the ability class. Remember to put low priority roles before
higher priority roles. This allows higher roles to overwrite behaviour
of lower roles.
Create abilities for each role in the given array . This simply tries to call a method on the ability object with the same name as the role . The role methods are called in the order they are defined in the ability class . Remember to put low priority roles before higher priority roles . This allows higher roles to overwrite behaviour of lower roles .
def apply_roles(roles)
        self.try(:guest) if roles.include?(:authenticated)
        defined_roles.each do |role|
          self.try(role) if roles.include? role
        end
      end
def apply_roles ( roles ) self . try ( :guest ) if roles . include? ( :authenticated ) defined_roles . each do | role | self . try ( role ) if roles . include? role end end
Create abilities for each role in the given array.
Create abilities for each role in the given array .
# If the user has the system role +authenticated+ include all # abilities for guest users too.
roles
<not_specific>