Class: Wco::Profile
- Inherits:
-
Object
- Object
- Wco::Profile
- Includes:
- Mongoid::Document, Mongoid::Paranoia, Mongoid::Timestamps
- Defined in:
- app/models/wco/profile.rb
Constant Summary collapse
- ROLE_ADMIN =
'admin'
- ROLE_GUY =
'guy'
- ROLES =
[ ROLE_ADMIN, ROLE_GUY ]
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.ai_writer ⇒ Object
40 41 42 |
# File 'app/models/wco/profile.rb', line 40 def self.ai_writer find_or_create_by email: '[email protected]' end |
.list ⇒ Object
47 48 49 |
# File 'app/models/wco/profile.rb', line 47 def self.list all.map { |p| [ p.email, p.id ] } end |
.roles_list ⇒ Object
36 37 38 |
# File 'app/models/wco/profile.rb', line 36 def self.roles_list [nil] + ROLES end |
Instance Method Details
#to_s ⇒ Object
44 45 46 |
# File 'app/models/wco/profile.rb', line 44 def to_s email end |