Module: CanTango::Api::Scope::Account
- Includes:
- Ability::Account
- Defined in:
- lib/cantango/api/scope/account.rb
Instance Method Summary collapse
- #real_account(scope, options = {}, &block) ⇒ Object
- #scope_account(scope, options = {}) {|ab_scope| ... } ⇒ Object (also: #account_scope)
Methods included from Ability::Account
#account_ability, #current_account_ability
Methods included from Options
#ability_options, options_list, #options_list
Methods included from Common
Instance Method Details
#real_account(scope, options = {}, &block) ⇒ Object
14 15 16 |
# File 'lib/cantango/api/scope/account.rb', line 14 def real_account scope, = {}, &block scope_account scope, .merge(:masquerade => false), &block end |
#scope_account(scope, options = {}) {|ab_scope| ... } ⇒ Object Also known as: account_scope
6 7 8 9 10 11 |
# File 'lib/cantango/api/scope/account.rb', line 6 def scope_account scope, = {}, &block account = scoped_account(scope) ab_scope = account_ability_scope(account, ) yield ab_scope if block ab_scope end |