Class: UserState
- Inherits:
-
Object
- Object
- UserState
- Defined in:
- app/models/user_state.rb
Overview
The State of the User.
When it signs up, it's pending
verification. Some features
of the system may be limited for verified Users only.
When it clicks on the link in the verification e-mail, it goes to the
confirmed
state. The use can make full use of the system while
in this state.
In case a User is causing problems, it can be transitioned to the
blocked
state. In that case, the user is inactive.
Instance Attribute Summary (collapse)
-
- (String) label
The label that describes the UserState.
Instance Method Summary (collapse)
-
- (Boolean) block(user)
If the User is in the
pending
state, transition it to theblocked
state. -
- (Boolean) confirm(user)
If the User is in the
pending
state, transition it to theconfirmed
state. -
- (Boolean) unblock(user)
If the User is in the
pending
state, do nothing.
Instance Attribute Details
- (String) label
Returns the label that describes the UserState.
14 15 16 |
# File 'app/models/user_state.rb', line 14 def label @label end |
Instance Method Details
- (Boolean) block(user)
38 39 |
# File 'app/models/user_state.rb', line 38 def block user end |
- (Boolean) confirm(user)
25 26 |
# File 'app/models/user_state.rb', line 25 def confirm user end |