Class: Trek::FragmentPolicy
- Inherits:
-
ApplicationPolicy
- Object
- ApplicationPolicy
- Trek::FragmentPolicy
- Defined in:
- app/policies/trek/fragment_policy.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#create? ⇒ Boolean
8 9 10 |
# File 'app/policies/trek/fragment_policy.rb', line 8 def create? user.privileged? end |
#index? ⇒ Boolean
4 5 6 |
# File 'app/policies/trek/fragment_policy.rb', line 4 def index? user.privileged? end |
#manage? ⇒ Boolean
12 13 14 |
# File 'app/policies/trek/fragment_policy.rb', line 12 def manage? user.privileged? end |
#permitted_attributes ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/policies/trek/fragment_policy.rb', line 16 def permitted_attributes if user.privileged? %i[ content key namespace title ] else [] end end |