Module: CanTango::Api::Scope::Account

Includes:
Ability::Account
Defined in:
lib/cantango/api/scope/account.rb

Instance Method Summary collapse

Methods included from Ability::Account

#account_ability, #current_account_ability

Methods included from Options

#ability_options, options_list, #options_list

Methods included from Common

#category, #create_ability

Instance Method Details

#real_account(scope, options = {}, &block) ⇒ Object



14
15
16
# File 'lib/cantango/api/scope/account.rb', line 14

def  scope, options = {}, &block
   scope, options.merge(:masquerade => false), &block
end

#scope_account(scope, options = {}) {|ab_scope| ... } ⇒ Object Also known as: account_scope

Yields:

  • (ab_scope)


6
7
8
9
10
11
# File 'lib/cantango/api/scope/account.rb', line 6

def  scope, options = {}, &block
   = (scope)
  ab_scope = (, options)
  yield ab_scope if block
  ab_scope
end