Class: Thredded::PrivatePostPolicy::Scope
- Inherits:
-
Object
- Object
- Thredded::PrivatePostPolicy::Scope
- Defined in:
- app/policies/thredded/private_post_policy.rb
Overview
The scope of readable private posts. Thredded::PrivateTopicPolicy must be applied separately.
Instance Method Summary collapse
-
#initialize(user, scope) ⇒ Scope
constructor
A new instance of Scope.
- #resolve ⇒ ActiveRecord::Relation<Thredded::Post>
Constructor Details
#initialize(user, scope) ⇒ Scope
Returns a new instance of Scope.
10 11 12 13 |
# File 'app/policies/thredded/private_post_policy.rb', line 10 def initialize(user, scope) @user = user @scope = scope end |
Instance Method Details
#resolve ⇒ ActiveRecord::Relation<Thredded::Post>
16 17 18 |
# File 'app/policies/thredded/private_post_policy.rb', line 16 def resolve @scope end |