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