Class: Wco::Profile
- Inherits:
-
Object
- Object
- Wco::Profile
- Includes:
- Mongoid::Document, 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
59 60 61 |
# File 'app/models/wco/profile.rb', line 59 def self.ai_writer find_or_create_by email: 'ai-writer@wasya.co' end |
.list ⇒ Object
70 71 72 |
# File 'app/models/wco/profile.rb', line 70 def self.list all.map { |p| [ p.email, p.id ] } end |
.pi ⇒ Object
63 64 65 |
# File 'app/models/wco/profile.rb', line 63 def self.pi find_by email: 'piousbox@gmail.com' end |
.roles_list ⇒ Object
55 56 57 |
# File 'app/models/wco/profile.rb', line 55 def self.roles_list [nil] + ROLES end |
Instance Method Details
#to_s ⇒ Object
67 68 69 |
# File 'app/models/wco/profile.rb', line 67 def to_s email end |