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

Includes:
Common, Options
Included in:
Can, Model::Scope::AllowedActions
Defined in:
lib/cantango/api/user/ability.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



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

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

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



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

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