Module: CanTango::Api::UserAccount::Scope
- Defined in:
- lib/cantango/api/user_account/scope.rb
Instance Method Summary collapse
- #account_scope(scope, options = {}) {|ab_scope| ... } ⇒ Object
- #as_real_account(scope, options = {}, &block) ⇒ Object
Instance Method Details
#account_scope(scope, options = {}) {|ab_scope| ... } ⇒ Object
6 7 8 9 10 11 |
# File 'lib/cantango/api/user_account/scope.rb', line 6 def account_scope scope, = {}, &block account = scoped_account(scope) ab_scope = account_ability_scope(account, ) yield ab_scope if block ab_scope end |
#as_real_account(scope, options = {}, &block) ⇒ Object
13 14 15 |
# File 'lib/cantango/api/user_account/scope.rb', line 13 def as_real_account scope, = {}, &block scope_account scope, .merge(:masquerade => false), &block end |