<commit_before><div class="question-answer-container">

  <!-- Show question -->
  <div class="question">
    <h1><%= @question.title %></h1>
    <p><%= @question.body %></p>
    <br>
    <% if current_user.id == @question.user_id %>
    <form action = "/questions/<%= @question.id %>/edit" method = "get">
    <input type="submit" value="Edit Question">
    </form>
    <form action = "/questions/<%= @question.id %>" method = "post">
    <input type="hidden" name="_method" value="DELETE">
    <input type="submit" value="Delete Question">
    </form>
    <% end %>
  </div>

  <!-- Show answers -->
  <div class="answer">
    <h2><%= @question.num_answers %> Answer<%= puts "s" if @question.num_answers > 1 %></h2>
    <% if @question.answers %>
      <% @question.answers.each do |answer| %>
        <table>
          <tr>
            <td>
              <form method="post" action="/questions/<%= @question.id %>/answers/<%= answer.id %>/vote" class="inline" question="<%= @question.id %>" answer="<%= answer.id %>">
                <button type="submit" name="up" value="submit_value" class="fa fa-chevron-up vote-button up-down-vote-button up-button"></button>
                <br>
                <text class="up-down-vote-button"><%= answer.vote_count %></text>
                <br>
                <button type="submit" name="down" value="submit_value" class="fa fa-chevron-down vote-button up-down-vote-button down-button"></button>
              </form>
            </td>
            <td><%= answer.text %><br>
              <form action = "/answers/<%= answer.id %>/edit" method = "get">
              <input type="submit" value="Edit Answer">
              </form>
              <form action = "/answers/<%= answer.id %>" method = "post">
              <input type="hidden" name="_method" value="DELETE">
              <input type="submit" value="Delete Answer">
              </form>
            </td>
          </tr>
        </table>
      <% end %>
    <% end %>
<commit_msg>added edit and delete routes for questions and answers<commit_after><div class="question-answer-container">

  <!-- Show question -->
  <div class="question">
    <h1><%= @question.title %></h1>
    <p><%= @question.body %></p>
    <br>
    <% if current_user.id == @question.user_id %>
    <form action = "/questions/<%= @question.id %>/edit" method = "get">
    <input type="submit" value="Edit Question">
    </form>
    <form action = "/questions/<%= @question.id %>" method = "post">
    <input type="hidden" name="_method" value="DELETE">
    <input type="submit" value="Delete Question">
    </form>
    <% end %>
  </div>

  <!-- Show answers -->
  <div class="answer">
    <h2><%= @question.num_answers %> Answer<%= puts "s" if @question.num_answers > 1 %></h2>
    <% if @question.answers %>
      <% @question.answers.each do |answer| %>
        <table>
          <tr>
            <td>
              <form method="post" action="/questions/<%= @question.id %>/answers/<%= answer.id %>/vote" class="inline" question="<%= @question.id %>" answer="<%= answer.id %>">
                <button type="submit" name="up" value="submit_value" class="fa fa-chevron-up vote-button up-down-vote-button up-button"></button>
                <br>
                <text class="up-down-vote-button"><%= answer.vote_count %></text>
                <br>
                <button type="submit" name="down" value="submit_value" class="fa fa-chevron-down vote-button up-down-vote-button down-button"></button>
              </form>
            </td>
            <td><%= answer.text %><br>
              <% if current_user.id == answer.user_id %>
              <form action = "/answers/<%= answer.id %>/edit" method = "get">
              <input type="submit" value="Edit Answer">
              </form>
              <form action = "/answers/<%= answer.id %>" method = "post">
              <input type="hidden" name="_method" value="DELETE">
              <input type="submit" value="Delete Answer">
              </form>
              <% end %>
            </td>
          </tr>
        </table>
      <% end %>
    <% end %>

{'fraction_non_alphanumeric': 0.199317738791423, 'fraction_numerical': 0.0024366471734892786, 'mean_word_length': 2.182170542635659, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 0, '>': 139, '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': '2823901', 'n_tokens_mistral': 1338, 'n_tokens_neox': 1237, 'n_words': 290}