Class: User
- Inherits:
-
AbstractUser
- Object
- ActiveRecord::Base
- ApplicationRecord
- AbstractUser
- User
- Defined in:
- app/models/user.rb
Constant Summary collapse
- ROLES =
['reader', 'editor', 'publisher', 'administrator']
Instance Method Summary collapse
Methods inherited from AbstractUser
#ability, default_user_role, #owns_role?, #to_s
Instance Method Details
#initials ⇒ Object
13 14 15 |
# File 'app/models/user.rb', line 13 def initials "#{forename[0]}#{surname[0]}" end |
#name ⇒ Object
9 10 11 |
# File 'app/models/user.rb', line 9 def name "#{forename} #{surname}" end |