Class: Thredded::MessageboardGroupPolicy
- Inherits:
-
Object
- Object
- Thredded::MessageboardGroupPolicy
- Defined in:
- app/policies/thredded/messageboard_group_policy.rb
Instance Method Summary collapse
- #create? ⇒ Boolean
-
#initialize(user, group) ⇒ MessageboardGroupPolicy
constructor
A new instance of MessageboardGroupPolicy.
Constructor Details
#initialize(user, group) ⇒ MessageboardGroupPolicy
Returns a new instance of MessageboardGroupPolicy.
7 8 9 10 |
# File 'app/policies/thredded/messageboard_group_policy.rb', line 7 def initialize(user, group) @user = user @group = group end |
Instance Method Details
#create? ⇒ Boolean
12 13 14 |
# File 'app/policies/thredded/messageboard_group_policy.rb', line 12 def create? @user.thredded_admin? end |