Class: User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- User
- Defined in:
- app/models/user.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.guest_user ⇒ Object
16 17 18 |
# File 'app/models/user.rb', line 16 def self.guest_user where(email: '[email protected]', role: Role::ADMIN_ROLE, name: 'Guest').first_or_create end |
Instance Method Details
#admin? ⇒ Boolean
20 21 22 |
# File 'app/models/user.rb', line 20 def admin? role == Role::ADMIN_ROLE end |