Class: User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- User
show all
- Defined in:
- app/models/user.rb
Defined Under Namespace
Classes: ConfirmationsController, Form, PasswordsController, RegistrationsController, SessionsController, UnlocksController
Instance Method Summary
collapse
Instance Method Details
#admin? ⇒ Boolean
13
14
15
|
# File 'app/models/user.rb', line 13
def admin?
roles.include?('admin')
end
|
#roles ⇒ Object
9
10
11
|
# File 'app/models/user.rb', line 9
def roles
read_attribute(:roles) || []
end
|