Class: Scrivito::Membership
- Inherits:
-
Object
- Object
- Scrivito::Membership
- Defined in:
- app/cms/scrivito/membership.rb
Overview
Instance Attribute Summary collapse
-
#role ⇒ String
readonly
The role associated with this membership.
-
#user_id ⇒ String
readonly
The User’s id.
Instance Method Summary collapse
Instance Attribute Details
#role ⇒ String (readonly)
Note:
Currently the only available role is “owner”.
The role associated with this membership.
19 20 21 |
# File 'app/cms/scrivito/membership.rb', line 19 def role @role end |
#user_id ⇒ String (readonly)
The User’s id
11 12 13 |
# File 'app/cms/scrivito/membership.rb', line 11 def user_id @user_id end |
Instance Method Details
#user ⇒ Object
Fetches and returns the User with the id #user_id. Uses the proc set in Configuration.find_user to fetch the user.
33 34 35 |
# File 'app/cms/scrivito/membership.rb', line 33 def user User.find(user_id) || User.unknown_user(user_id) end |