<commit_before>get '/choices/new' do
  @choice_numbers = (1..params[:question_choices].to_i).to_a
  @question = Question.create(params[:question])
  @survey = @question.survey
  erb :'/choices/new'
end

post '/choices' do
  @survey = Survey.find_by(id: params[:survey_id])
  @choice = Choice.create(params[:choice])<commit_msg>Add error checking in choices post route"<commit_after>get '/choices/new' do
  @choice_numbers = (1..params[:question_choices].to_i).to_a
  @question = Question.create(params[:question])
  @survey = @question.survey
  erb :'/choices/new'
end

post '/choices' do
  @survey = Survey.find_by(id: params[:survey_id])
  @choice = Choice.new(params[:choice])
  unless @choice.save
    @errors = @choice.errors
  end
{'fraction_non_alphanumeric': 0.15896739130434784, 'fraction_numerical': 0.002717391304347826, 'mean_word_length': 4.991869918699187, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2961201', 'n_tokens_mistral': 269, 'n_tokens_neox': 264, 'n_words': 50}