Class: Elabs::User
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Elabs::User
- Defined in:
- app/models/elabs/user.rb
Instance Attribute Summary
Attributes inherited from ApplicationRecord
Instance Method Summary collapse
Instance Method Details
#admin? ⇒ Boolean
28 29 30 |
# File 'app/models/elabs/user.rb', line 28 def admin? role == 'admin' end |
#display_name ⇒ Object
32 33 34 |
# File 'app/models/elabs/user.rb', line 32 def display_name real_name.present? ? real_name : "@#{username}" end |