Class: User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- User
- Defined in:
- lib/forge/app/models/user.rb
Instance Method Summary collapse
Instance Method Details
#apply_member_role ⇒ Object
23 24 25 |
# File 'lib/forge/app/models/user.rb', line 23 def apply_member_role self.roles << Role.find_by_title("Member") if self.roles.blank? end |
#member? ⇒ Boolean
32 33 34 |
# File 'lib/forge/app/models/user.rb', line 32 def member? is_member? end |
#staff? ⇒ Boolean
36 37 38 |
# File 'lib/forge/app/models/user.rb', line 36 def staff? is_super_admin? || is_admin? || is_contributor? end |