Class: AssignmentPolicy
- Inherits:
-
ApplicationPolicy
- Object
- ApplicationPolicy
- AssignmentPolicy
- Defined in:
- app/policies/assignment_policy.rb
Overview
Protects Assignment objects with policies.
Instance Method Summary collapse
-
#index? ⇒ Boolean
(also: #show?, #create?, #new?, #update?, #edit?, #destroy?)
If the user is a admin, they can work with assignments.
Methods inherited from ApplicationPolicy
Constructor Details
This class inherits a constructor from ApplicationPolicy
Instance Method Details
#index? ⇒ Boolean Also known as: show?, create?, new?, update?, edit?, destroy?
Returns if the user is a admin, they can work with assignments
4 5 6 |
# File 'app/policies/assignment_policy.rb', line 4 def index? user.admin? end |