Module: CanTango::Ability::Helper::Role

Includes:
Helpers::Role
Defined in:
lib/cantango/roles_ext/ability/helper/role.rb

Instance Method Summary collapse

Methods included from Helpers::Role

#config, #role_method

Instance Method Details

#rolesObject

return list roles the user has



6
7
8
9
# File 'lib/cantango/roles_ext/ability/helper/role.rb', line 6

def roles
  return [] if !subject.respond_to?(roles_list_meth) || roles_of(subject).blank?
  roles_of(subject).flatten
end