<commit_before>class CampaignPolicy < ApplicationPolicy
  def destroy?
    user == record.game_master
  end

  def update?
    destroy?
  end

  def create?
    record.member?(user)
  end

  def toggle_membership?
    user.present?
  end
end
<commit_msg>Add policy for new campaign<commit_after>class CampaignPolicy < ApplicationPolicy
  def destroy?
    user == record.game_master
  end

  def update?
    destroy?
  end

  def create?
    record.member?(user)
  end

  def toggle_membership?
    user.present?
  end

  def new?
    record.member?(user)
  end
end

{'fraction_non_alphanumeric': 0.07256637168141593, 'fraction_numerical': 0.0, 'mean_word_length': 3.0141843971631204, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1339859', 'n_tokens_mistral': 186, 'n_tokens_neox': 181, 'n_words': 50}