<commit_before>class GamesController < ApplicationController
  expose(:campaign)
  expose(:games) { campaign.games }
  expose(:game, attributes: :game_params)
  before_action :authenticate_user!, except: :show
  expose(:heroes) { game.heroes }

  respond_to :html, :json, :xml

  def show
    authorize game
    respond_with(game)
  end

  def new
    authorize game
    respond_with(game)
  end

  def edit
  end

  def create
    authorize game
    game.save
    NotifyMembers.new(game, current_user).call
    respond_with(campaign)
  end

  def update
    authorize game
    game.update(game_params)
    respond_with(campaign, game)
  end

  def destroy
    authorize game
    game.destroy<commit_msg>Update games controller for decent exposure 3<commit_after>class GamesController < ApplicationController
  expose(:campaign)
  expose(:games) { campaign.games }
  expose(:game)
  before_action :authenticate_user!, except: :show
  expose(:heroes) { game.heroes }

  respond_to :html, :json, :xml

  def show
    authorize game
    respond_with(game)
  end

  def new
    game.campaign = campaign
    authorize game
    respond_with(game)
  end

  def edit
  end

  def create
    game = Game.new(game_params)
    game.campaign = campaign
    authorize game
    game.save
    NotifyMembers.new(game, current_user).call
    respond_with(campaign)
  end

  def update
    authorize game
    game.update(game_params)
    respond_with(campaign, game)
  end

  def destroy
    authorize game
    game.destroy
{'fraction_non_alphanumeric': 0.07508305647840531, 'fraction_numerical': 0.000664451827242525, 'mean_word_length': 3.315186246418338, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1539229', 'n_tokens_mistral': 493, 'n_tokens_neox': 467, 'n_words': 121}