<commit_before><div>Billcrush: <%= @group.name %></div>


<h3>Members</h3>
<ul>
<% @members.each do |member| %>
  <li><%= member.name %> - <%= member.balance %></li>
<% end %>
</ul>

<h3>Transactions</h3>
<ul>
<% @transactions.each do |transaction| %>
  <li><%= transaction.description %> - <%= transaction.amount %></li>
<% end %>
</ul>


<%= form_for [@group, @new_member] do |f| %>
  <%= f.label(:name) %>
  <%= f.text_field(:name) %>
  <%= f.submit %>
<% end %>

<%= form_for [@group, @new_transaction] do |tf| %>
  <%= tf.label :payer, "Paid by" %>
  <%= collection_select(:transaction, :payer, @group.members, :id, :name) %>
  <%= tf.label :description %>
  <%= tf.text_field :description %>
  <%= tf.label :amount, "Total amount" %>
  <%= tf.text_field :amount %>
  <% @members.each do |member| %>
    <label for="transaction_<%= member.to_param %>_amount"><%= member.name %></label>
    <input type="hidden" name="transaction[members][][id]" value="<%= member.to_param %>" />
    <input id="transaction_<%= member.to_param %>_amount" name="transaction[members][][amount]" size="6" type="text" />
  <% end %>
  <%= tf.submit %>
<% end %><commit_msg>fix view of balances<commit_after><div>Billcrush: <%= @group.name %></div>


<h3>Members</h3>
<ul>
<% @members.each do |member| %>
  <li><%= member.name %> - <%= member.balance.to_f / 100 %></li>
<% end %>
</ul>

<h3>Transactions</h3>
<ul>
<% @transactions.each do |transaction| %>
  <li><%= transaction.description %> - <%= transaction.amount.to_f / 100 %></li>
<% end %>
</ul>


<%= form_for [@group, @new_member] do |f| %>
  <%= f.label(:name) %>
  <%= f.text_field(:name) %>
  <%= f.submit %>
<% end %>

<%= form_for [@group, @new_transaction] do |tf| %>
  <%= tf.label :payer, "Paid by" %>
  <%= collection_select(:transaction, :payer, @group.members, :id, :name) %>
  <%= tf.label :description %>
  <%= tf.text_field :description %>
  <%= tf.label :amount, "Total amount" %>
  <%= tf.text_field :amount %>
  <% @members.each do |member| %>
    <label for="transaction_<%= member.to_param %>_amount"><%= member.name %></label>
    <input type="hidden" name="transaction[members][][id]" value="<%= member.to_param %>" />
    <input id="transaction_<%= member.to_param %>_amount" name="transaction[members][][amount]" size="6" type="text" />
  <% end %>
  <%= tf.submit %>
<% end %>
{'fraction_non_alphanumeric': 0.2571550619393422, 'fraction_numerical': 0.006834686031610423, 'mean_word_length': 4.3963133640553, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 97, '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': '495269', 'n_tokens_mistral': 992, 'n_tokens_neox': 861, 'n_words': 169}