Module: CanTango::Api::Common

Includes:
Attributes
Included in:
User::Ability, UserAccount::Ability
Defined in:
lib/cantango/api/common.rb

Instance Method Summary collapse

Instance Method Details

#category(label) ⇒ Object



10
11
12
# File 'lib/cantango/api/common.rb', line 10

def category label
  config.models.by_category label
end

#create_ability(candidate, opts = {}) ⇒ Object



6
7
8
# File 'lib/cantango/api/common.rb', line 6

def create_ability candidate, opts = {}
  CanTango.config.ability.factory_build candidate, opts
end