Class: SbPostPolicy
- Inherits:
-
ApplicationPolicy
- Object
- ApplicationPolicy
- SbPostPolicy
- Defined in:
- app/policies/sb_post_policy.rb
Instance Attribute Summary
Attributes inherited from ApplicationPolicy
Instance Method Summary collapse
Methods inherited from ApplicationPolicy
#create?, #destroy_all?, #index?, #initialize, #new?, #scope, #show?
Constructor Details
This class inherits a constructor from ApplicationPolicy
Instance Method Details
#destroy? ⇒ Boolean
7 8 9 |
# File 'app/policies/sb_post_policy.rb', line 7 def destroy? update? end |
#edit? ⇒ Boolean
3 4 5 |
# File 'app/policies/sb_post_policy.rb', line 3 def edit? update? end |
#update? ⇒ Boolean
11 12 13 |
# File 'app/policies/sb_post_policy.rb', line 11 def update? record.editable_by?(user) end |