<commit_before><% if policy(@deal).owner? %>
  <p><%= link_to 'Edit', edit_deal_path(@deal) %></p>
  <p><%= link_to 'Destroy', @deal, method: :delete, data: { confirm: 'Are you sure?' } %></p>
<% end %>

<% if @deal.active? || policy(@deal.owner) %>
  <p>
    <strong>Deal Posted By:</strong>
    <%= link_to @deal.owner.name, user_show_path(@deal.owner_id) %>
  </p>

  <p>
    <strong>Title:</strong>
    <%= @deal.title %>
  </p>

  <p>
    <strong>Image:</strong>
    <img src="<%= @deal.image %>">
  </p>

  <p>
    <strong>Description:</strong>
    <%= @deal.description %>
  </p>

  <p>
    <strong>Commitments Needed:</strong>
    <%= @deal.goal %>
  </p>

  <p>
    <strong>Progress to Goal:</strong>
    <%= @deal.funded? ? "Funded!" : "#{@deal.users.count} out of #{@deal.goal}" %>

  <p>
    <strong>Location:</strong>
    <%= @deal.location %>
  </p>

  <p>
    <strong>Start:</strong>
    <%= @deal.start %>
  </p>

  <p>
    <strong>End:</strong>
    <%= @deal.end %>
  </p>

  <p>
    <strong>Published:</strong>
    <%= @deal.published %>
  </p>

  <p>
    <strong>Private:</strong>
    <%= @deal.private %>
  </p>

  <p>
    <strong>Amount:</strong>
    <%= @deal.amount %>
  </p>

  <p>
    <strong>Committers</strong>:
    <% @deal.users.each do |user| %>
      <p><%= user.name %></p>
    <% end %>
  </p>
<% end %>

<p>
  <%= link_to "Commit!", deal_confirmation_path(@deal) unless @deal.funded? %>
</p>

<%= link_to 'Back', deals_path %>

<%= render partial: 'comments/form', deal: @deal %>

<h2>Comments</h2>

<% @deal.comments.each do |comment| %>
  <p><strong><%= comment.user.name %></strong><br>
    Created <%= time_ago_in_words(comment.created_at) %> ago<br>
    <%= comment.body %><br>
    <%= link_to "Edit", edit_deal_comment_path(@deal, comment) %>
  </p>
<% end %>
<commit_msg>remove policy from show page for now<commit_after><% if policy(@deal).owner? %>
  <p><%= link_to 'Edit', edit_deal_path(@deal) %></p>
  <p><%= link_to 'Destroy', @deal, method: :delete, data: { confirm: 'Are you sure?' } %></p>
<% end %>

<% if @deal.active? %>
  <p>
    <strong>Deal Posted By:</strong>
    <%= link_to @deal.owner.name, user_show_path(@deal.owner_id) %>
  </p>

  <p>
    <strong>Title:</strong>
    <%= @deal.title %>
  </p>

  <p>
    <strong>Image:</strong>
    <img src="<%= @deal.image %>">
  </p>

  <p>
    <strong>Description:</strong>
    <%= @deal.description %>
  </p>

  <p>
    <strong>Commitments Needed:</strong>
    <%= @deal.goal %>
  </p>

  <p>
    <strong>Progress to Goal:</strong>
    <%= @deal.funded? ? "Funded!" : "#{@deal.users.count} out of #{@deal.goal}" %>

  <p>
    <strong>Location:</strong>
    <%= @deal.location %>
  </p>

  <p>
    <strong>Start:</strong>
    <%= @deal.start %>
  </p>

  <p>
    <strong>End:</strong>
    <%= @deal.end %>
  </p>

  <p>
    <strong>Published:</strong>
    <%= @deal.published %>
  </p>

  <p>
    <strong>Private:</strong>
    <%= @deal.private %>
  </p>

  <p>
    <strong>Amount:</strong>
    <%= @deal.amount %>
  </p>

  <p>
    <strong>Committers</strong>:
    <% @deal.users.each do |user| %>
      <p><%= user.name %></p>
    <% end %>
  </p>
<% end %>

<p>
  <%= link_to "Commit!", deal_confirmation_path(@deal) unless @deal.funded? %>
</p>

<%= link_to 'Back', deals_path %>

<%= render partial: 'comments/form', deal: @deal %>

<h2>Comments</h2>

<% @deal.comments.each do |comment| %>
  <p><strong><%= comment.user.name %></strong><br>
    Created <%= time_ago_in_words(comment.created_at) %> ago<br>
    <%= comment.body %><br>
    <%= link_to "Edit", edit_deal_comment_path(@deal, comment) %>
  </p>
<% end %>

{'fraction_non_alphanumeric': 0.25165562913907286, 'fraction_numerical': 0.0011037527593818985, 'mean_word_length': 3.0099557522123894, 'pattern_counts': {'":': 0, '<': 201, '<?xml version=': 0, '>': 201, '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': '6174557', 'n_tokens_mistral': 1639, 'n_tokens_neox': 1441, 'n_words': 263}