<commit_before><h1>Event</h1>

<%= link_to 'Edit', edit_event_path(@event) %>
|
<%= link_to 'Delete', @event, method: :delete, data: { confirm: 'Are you sure?' } %>

<p><strong>
  <% if @event.participants.include? current_user %>
    <%= link_to 'Cancel', unattend_event_path(@event), method: :patch %>
  <% else %>
    <%= link_to 'Join', attend_event_path(@event), method: :patch %>
  <% end %>
</strong></p>

<dl>
  <dt>When</dt>
  <dd><%= @event.start %> to <%= @event.finish %></dd>
</dl>

<section>
  <h2>Participants</h2>
  <% if @event.participants.any? %>
    <ul>
      <% @event.participants.each do |user| %>
        <li><%= user.email %></li>
      <% end %>
    </ul>
  <% else %>
    <p>None yet.</p>
  <% end %>
</section><commit_msg>minor usability improvements for events. rename cancel so it is distinguished from delete. add link to home page at the bottom because logo being a link may not be obvious<commit_after><h1>Event</h1>

<%= link_to 'Edit', edit_event_path(@event) %>
|
<%= link_to 'Delete', @event, method: :delete, data: { confirm: 'Are you sure?' } %>

<p><strong>
  <% if @event.participants.include? current_user %>
    <%= link_to 'Cancel RSVP', unattend_event_path(@event), method: :patch %>
  <% else %>
    <%= link_to 'Join', attend_event_path(@event), method: :patch %>
  <% end %>
</strong></p>

<dl>
  <dt>When</dt>
  <dd><%= @event.start %> to <%= @event.finish %></dd>
</dl>

<section>
  <h2>Participants</h2>
  <% if @event.participants.any? %>
    <ul>
      <% @event.participants.each do |user| %>
        <li><%= user.email %></li>
      <% end %>
    </ul>
  <% else %>
    <p>None yet.</p>
  <% end %>
</section>

<%= link_to 'All Events', root_path %>
{'fraction_non_alphanumeric': 0.2217008797653959, 'fraction_numerical': 0.00469208211143695, 'mean_word_length': 3.5372340425531914, 'pattern_counts': {'":': 0, '<': 78, '<?xml version=': 0, '>': 78, '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': '4901867', 'n_tokens_mistral': 698, 'n_tokens_neox': 621, 'n_words': 147}