Module: CanTango::Api::Model::User
- Includes:
- Common
- Defined in:
- lib/cantango/api/model/user.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Methods included from Common
#category, #create_ability
Instance Attribute Details
#ability_class=(value) ⇒ Object
Sets the attribute ability_class
4
5
6
|
# File 'lib/cantango/api/model/user.rb', line 4
def ability_class=(value)
@ability_class = value
end
|
#active_account ⇒ Object
14
15
16
17
18
|
# File 'lib/cantango/api/model/user.rb', line 14
def active_account
return @active_account if @active_account
return send(:account) if respond_to? :account
raise "No account could be found for user: #{self}"
end
|
#active_user ⇒ Object
10
11
12
|
# File 'lib/cantango/api/model/user.rb', line 10
def active_user
@active_user || self
end
|
Class Method Details
.included(clazz) ⇒ Object
6
7
8
|
# File 'lib/cantango/api/model/user.rb', line 6
def self.included(clazz)
CanTango.config.users.register_user clazz
end
|