Module: CanTango::Api::Ability::User

Includes:
CanTango::Api::Attributes, Common, Options
Included in:
Can::User, Scope::User
Defined in:
lib/cantango/api/ability/user.rb

Defined Under Namespace

Modules: AbilityUser

Instance Method Summary collapse

Methods included from Options

#ability_options, options_list, #options_list

Methods included from Common

#category, #create_ability

Instance Method Details

#current_user_ability(user_type = :user) ⇒ Object



8
9
10
# File 'lib/cantango/api/ability/user.rb', line 8

def current_user_ability user_type = :user
  user_ability get_ability_user(user_type)
end

#user_ability(user, options = {}) ⇒ Object



4
5
6
# File 'lib/cantango/api/ability/user.rb', line 4

def user_ability user, options = {}
  create_ability(user, ability_options.merge(options))
end