Class: PagePolicy
- Inherits:
-
BlockRecordPolicy
- Object
- ApplicationPolicy
- BlockRecordPolicy
- PagePolicy
- Defined in:
- app/policies/page_policy.rb
Instance Attribute Summary
Attributes inherited from ApplicationPolicy
Instance Method Summary collapse
Methods inherited from BlockRecordPolicy
Methods inherited from ApplicationPolicy
#create?, #destroy?, #edit?, #index?, #initialize, #new?, #scope, #update?, #view_hidden?
Constructor Details
This class inherits a constructor from ApplicationPolicy
Instance Method Details
#show? ⇒ Boolean
2 3 4 5 6 7 8 |
# File 'app/policies/page_policy.rb', line 2 def show? if @record.statusable? @record.published? || view_hidden? else true end end |