Module: CanTango::Api::Scope::User
- Includes:
- Ability::User
- Defined in:
- lib/cantango/api/scope/user.rb
Instance Method Summary collapse
- #real_user(scope, options = {}, &block) ⇒ Object
- #scope_user(scope, options = {}) {|ab_scope| ... } ⇒ Object (also: #user_scope)
Methods included from Ability::User
#current_user_ability, #user_ability
Methods included from Options
#ability_options, options_list, #options_list
Methods included from Common
Instance Method Details
#real_user(scope, options = {}, &block) ⇒ Object
14 15 16 |
# File 'lib/cantango/api/scope/user.rb', line 14 def real_user scope, = {}, &block scope_user scope, .merge(:masquerade => false), &block end |
#scope_user(scope, options = {}) {|ab_scope| ... } ⇒ Object Also known as: user_scope
6 7 8 9 10 11 |
# File 'lib/cantango/api/scope/user.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 |