Class: Thredded::MessageboardGroupPolicy

Inherits:
Object
  • Object
show all
Defined in:
app/policies/thredded/messageboard_group_policy.rb

Instance Method Summary collapse

Constructor Details

#initialize(user, group) ⇒ MessageboardGroupPolicy

Returns a new instance of MessageboardGroupPolicy.

Parameters:



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

Returns:

  • (Boolean)


12
13
14
# File 'app/policies/thredded/messageboard_group_policy.rb', line 12

def create?
  @user.thredded_admin?
end