<commit_before><table class="table table-condensed table-hover">
  <thead>
    <th>#</th>
    <th><%= Representative.human_attribute_name :name %></th>
    <th><%= Representative.human_attribute_name :party %></th>
    <th><%= Representative.human_attribute_name :email %></th>
    <th><%= Representative.human_attribute_name :twitter_id %></th>
    <th><%= Representative.human_attribute_name :attending %></th>
    <th></th>
    <th><%= t('app.questions_and_answers.short') %></th>
  </thead>
  <tbody>
    <% @representatives.each do |rep| %>
      <tr class="<%= row_class_for_admin_representative(rep) %>">
        <td><%= link_to rep.external_id, rep %></td>
        <td><%= rep.display_name %></td>
        <td><%= rep.latest_party.external_id  %></td>
        <td><%= link_to rep.email, "mailto:#{rep.email}" if rep.email %></td>
        <td><%= link_to rep.twitter_id, rep.twitter_url if rep.twitter_id %> </td>
        <td><%= t(rep.attending? ? 'app.yes' : 'app.no') %></td>
        <td><%= link_to t('app.edit'), edit_admin_representative_path(rep), class: 'btn btn-small', disabled: !policy(rep).edit? %></td>
        <td>
          <% if rep.confirmed? %>
            <%= link_to t('app.questions_and_answers.representative.forgot_password'), admin_representative_reset_password_path(rep), class: 'btn btn-small', disabled: !policy(rep).edit? %>
          <% elsif rep.confirmation_sent_at %>
            <%= link_to t('app.questions_and_answers.representative.reactivate'), admin_representative_activate_path(rep), class: 'btn btn-small', disabled: !policy(rep).edit? %>
          <% else %>
            <%= link_to t('app.questions_and_answers.representative.activate'), admin_representative_activate_path(rep), class: 'btn btn-small', disabled: !policy(rep).edit? %>
          <% end %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table><commit_msg>Add a confirm() for representative activation.<commit_after><table class="table table-condensed table-hover">
  <thead>
    <th>#</th>
    <th><%= Representative.human_attribute_name :name %></th>
    <th><%= Representative.human_attribute_name :party %></th>
    <th><%= Representative.human_attribute_name :email %></th>
    <th><%= Representative.human_attribute_name :twitter_id %></th>
    <th><%= Representative.human_attribute_name :attending %></th>
    <th></th>
    <th><%= t('app.questions_and_answers.short') %></th>
  </thead>
  <tbody>
    <% @representatives.each do |rep| %>
      <tr class="<%= row_class_for_admin_representative(rep) %>">
        <td><%= link_to rep.external_id, rep %></td>
        <td><%= rep.display_name %></td>
        <td><%= rep.latest_party.external_id  %></td>
        <td><%= link_to rep.email, "mailto:#{rep.email}" if rep.email %></td>
        <td><%= link_to rep.twitter_id, rep.twitter_url if rep.twitter_id %> </td>
        <td><%= t(rep.attending? ? 'app.yes' : 'app.no') %></td>
        <td><%= link_to t('app.edit'), edit_admin_representative_path(rep), class: 'btn btn-small', disabled: !policy(rep).edit? %></td>
        <td>
          <% if rep.confirmed? %>
            <%= link_to t('app.questions_and_answers.representative.forgot_password'),
                        admin_representative_reset_password_path(rep),
                        class: 'btn btn-small',
                        disabled: !policy(rep).edit? %>
          <% elsif rep.confirmation_sent_at %>
            <%= link_to t('app.questions_and_answers.representative.reactivate'),
                        admin_representative_activate_path(rep),
                        class: 'btn btn-small',
                        disabled: !policy(rep).edit?,
                        confirm: 'Er du sikker på at du vil sende aktiveringsepost til representanten?' %>
          <% else %>
            <%= link_to t('app.questions_and_answers.representative.activate'),
                        admin_representative_activate_path(rep),
                        class: 'btn btn-small',
                        disabled: !policy(rep).edit?,
                        confirm: 'Er du sikker på at du vil sende aktiveringsepost til representanten?' %>
          <% end %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
{'fraction_non_alphanumeric': 0.175576146353053, 'fraction_numerical': 0.0, 'mean_word_length': 2.7962128043282237, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 129, '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': '7141715', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1321, 'n_words': 256}