<commit_before>class GameController < ApplicationController
  def index
    @games = Game.all
  end

  def new
    @game = Game.new
  end

  def create
    @game = Game.new(game_params)

    if @game.save
      redirect_to game_path, notice: "Your Game has Been Successfully Created!"
    else
      @errors = @game.errors
      render :new
    end
  end

  def show
    @game = Game.find(params[:id])
  end

  def update
    render :show
  end

  def destroy
    Game.destroy(params[:id])
  end

  private

  def game_params
    params.require(:game).permit()<commit_msg>Add param limits for games<commit_after>class GameController < ApplicationController
  def index
    @games = Game.all
  end

  def new
    @game = Game.new
  end

  def create
    @game = Game.new(game_params)

    if @game.save
      redirect_to game_path, notice: "Your Game has Been Successfully Created!"
    else
      @errors = @game.errors
      render :new
    end
  end

  def show
    @game = Game.find(params[:id])
  end

  def update
    render :show
  end

  def destroy
    Game.destroy(params[:id])
  end

  private

  def game_params
    params.require(:game).permit(:dungeon_master, :game_name, :game_system, :level_range, :description, :minimum_number_of_players, :maximum_number_of_players, :start_time, :end_time)
{'fraction_non_alphanumeric': 0.08805513016845329, 'fraction_numerical': 0.0, 'mean_word_length': 2.901492537313433, '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': '1060425', 'n_tokens_mistral': 441, 'n_tokens_neox': 420, 'n_words': 117}