<commit_before><commit_msg>add view to new questions<commit_after><h2>Add questions to "<%= @survey.title %>"</h2>

  <% if !@errors.empty? %>
  <ul class="errors">
    <% @errors.each do |message| %>
      <li><%= message %></li>
    <% end %>
  </ul>
  <% end %>

<form action="/questions" method="post">
  <label for="query_input">Question: </label>
  <input type="text" id="query_input" name="query" value="<%= params[:query] %>"></input>
  <% params[:options] = {} if !params[:options] %>
  <label for="option_input">Options: </label>
  <input type="text" id="option_input" name="options[1]" value="<%= "#{params[:options]["1"]}" %>"></input>
  <input type="text" id="option_input" name="options[2]" value="<%= "#{params[:options]["2"]}" %>"></input>
  <input type="text" id="option_input" name="options[3]" value="<%= "#{params[:options]["3"]}" %>"></input>
  <input type="text" id="option_input" name="options[4]" value="<%= "#{params[:options]["4"]}" %>"></input>

  <input type="submit" value="Add Question"></input>
</form>
<a href="/">Done</a>
<% @survey.questions.order(:created_at).includes(:options).each do |question| %>
  <div class="question">
  <p><%= question.prompt %></p>
  <% options = question.options.includes(:chosen_options) %>
  <div class="option-list">
  <% options.each do |option| %>
    <div>
      <%= option.response %>
    </div>
  <% end %>
  </div>
<% end %>
{'fraction_non_alphanumeric': 0.26738351254480286, 'fraction_numerical': 0.007168458781362007, 'mean_word_length': 5.204444444444444, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, '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': '1331753', 'n_tokens_mistral': 524, 'n_tokens_neox': 478, 'n_words': 97}