Class: DashboardPolicy
- Inherits:
-
Struct
- Object
- Struct
- DashboardPolicy
- Defined in:
- app/policies/dashboard_policy.rb
Instance Attribute Summary collapse
-
#dashboard ⇒ Object
Returns the value of attribute dashboard.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#dashboard ⇒ Object
Returns the value of attribute dashboard
1 2 3 |
# File 'app/policies/dashboard_policy.rb', line 1 def dashboard @dashboard end |
#user ⇒ Object
Returns the value of attribute user
1 2 3 |
# File 'app/policies/dashboard_policy.rb', line 1 def user @user end |
Instance Method Details
#index? ⇒ Boolean
2 3 4 |
# File 'app/policies/dashboard_policy.rb', line 2 def index? admin? || editor? || contributor? end |