Class: User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- User
- Defined in:
- app/models/user.rb
Instance Attribute Summary collapse
-
#requested_group ⇒ Object
Returns the value of attribute requested_group.
Instance Method Summary collapse
Instance Attribute Details
#requested_group ⇒ Object
Returns the value of attribute requested_group.
12 13 14 |
# File 'app/models/user.rb', line 12 def requested_group @requested_group end |
Instance Method Details
#add_requested_group ⇒ Object
31 32 33 |
# File 'app/models/user.rb', line 31 def add_requested_group groups << Group.find(requested_group) if requested_group #with granted => false end |
#has_role?(rolename) ⇒ Boolean
27 28 29 |
# File 'app/models/user.rb', line 27 def has_role?(rolename) roles.any? { |role| role.name == rolename.to_s } end |