<commit_before>class BoardsController < ApplicationController
  def create
    if Board.all.any? {|b| b.state == params[:state].values}
      board = Board.all.select {|b| b.state == params[:state].values}[0]
    else
      board = Board.create(state: params[:state].values, turn: params[:turn], player: params[:player])
    end
    respond_to do |format|<commit_msg>enable play without login<commit_after>class BoardsController < ApplicationController
  skip_before_action :authenticate_user!, only: [:create]
  
  def create
    if Board.all.any? {|b| b.state == params[:state].values}
      board = Board.all.select {|b| b.state == params[:state].values}[0]
    else
      board = Board.create(state: params[:state].values, turn: params[:turn], player: params[:player])
    end
    respond_to do |format|
{'fraction_non_alphanumeric': 0.1449814126394052, 'fraction_numerical': 0.0024783147459727386, 'mean_word_length': 4.212903225806452, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '506907', 'n_tokens_mistral': 247, 'n_tokens_neox': 243, 'n_words': 60}