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
54 55 56 |
# File 'app/models/wco/profile.rb', line 54 def self.ai_writer find_or_create_by email: 'ai-writer@wasya.co' end |
.list ⇒ Object
65 66 67 |
# File 'app/models/wco/profile.rb', line 65 def self.list all.map { |p| [ p.email, p.id ] } end |
.pi ⇒ Object
58 59 60 |
# File 'app/models/wco/profile.rb', line 58 def self.pi find_by email: 'piousbox@gmail.com' end |
.roles_list ⇒ Object
50 51 52 |
# File 'app/models/wco/profile.rb', line 50 def self.roles_list [nil] + ROLES end |
Instance Method Details
#to_s ⇒ Object
62 63 64 |
# File 'app/models/wco/profile.rb', line 62 def to_s email end |