Module: CanTango::Api::User::Scope
- Defined in:
- lib/cantango/api/user/scope.rb
Instance Method Summary collapse
- #real_user(scope, options = {}, &block) ⇒ Object
- #scope_user(scope, options = {}) {|ab_scope| ... } ⇒ Object
Instance Method Details
#real_user(scope, options = {}, &block) ⇒ Object
13 14 15 |
# File 'lib/cantango/api/user/scope.rb', line 13 def real_user scope, = {}, &block scope_user scope, .merge(:masquerade => false), &block end |
#scope_user(scope, options = {}) {|ab_scope| ... } ⇒ Object
6 7 8 9 10 11 |
# File 'lib/cantango/api/user/scope.rb', line 6 def scope_user scope, = {}, &block user = scoped_user(scope) ab_scope = user_ability_scope(user, ) yield ab_scope if block ab_scope end |