<commit_before><h1>JERKY <small>get your jerky here</small></h1>
<h3>Serving order <small><%= session[:cart_id] %></small></h3>
<h4>Subtotal: <%= number_to_currency(@cart.subtotal) %></h4>
<% unless @cart.items.count == 0 then %>
  <div class="well">
    <ul class="list-group">
    <% @cart.items.each do |item| %>
      <li class="list-group-item">
        <span class="badge"><%= number_to_currency(item.price) %></span>
        <h4>(<%= item.quantity %>)
          <%= item.size.name %>
          <%= "Bag".pluralize(item.quantity) %> of
          <%= item.flavor.name %> flavor
          <%= item.type.name %>
        </h4>
        <button type="button" class="btn btn-default btn-lg">
          <%= link_to "remove", item, method: "delete" %>
        </button>
      </li>
    <% end %>
  </ul>
  </div>
<% end %>
<%= form_tag({controller: "items", action: "create"}, method: "post", class: "form-inline") do |f| %>
  <div class="form-group">
    <label class="sr-only" for="exampleInputEmail2">Flavor</label>
    <div class="input-group">
      <div class="input-group-addon">Flavor:</div>
      <select class="form-control" name="item[flavor_id]">
        <%= Flavor.all.each do |flavor| %>
          <option value=<%= flavor.id %>><%= flavor.name %></option>
        <% end %>
      </select>
    </div>
  </div>
  <div class="form-group">
    <label class="sr-only" for="exampleInputEmail2">Type</label>
    <div class="input-group">
      <div class="input-group-addon">Type:</div>
      <select class="form-control" name="item[type_id]">
        <%= Type.all.each do |type| %>
          <option value=<%= type.id %>><%= type.name %></option>
        <% end %>
      </select>
    </div>
  </div>
    <div class="form-group">
    <label class="sr-only" for="exampleInputEmail2">Size</label>
    <div class="input-group">
      <div class="input-group-addon">Size:</div>
      <select class="form-control" name="item[size_id]">
        <%= Size.all.each do |size| %>
          <option value=<%= size.id %>><%= size.name %></option>
        <% end %>
      </select>
    </div>
  </div>
  <div class="form-group">
    <div class="input-group">
      <div class="input-group-addon">Quantity:</div>
      <input class="form-control" type="text" name="item[quantity]" placeholder="Enter quantity" value="1">
    </div>
  </div>
  <input type="hidden" name="item[cart_id]" value="<%= @cart.id %>" />
  <button type="submit" class="btn btn-default">Add to order</button>
<% end %><commit_msg>move order form above cart<commit_after><h1>JERKY <small>get your jerky here</small></h1>
<h3>Serving order <small><%= session[:cart_id] %></small></h3>
<h4>Subtotal: <%= number_to_currency(@cart.subtotal) %></h4>

<%= form_tag({controller: "items", action: "create"}, method: "post", class: "form-inline") do |f| %>
  <div class="form-group">
    <label class="sr-only" for="exampleInputEmail2">Flavor</label>
    <div class="input-group">
      <div class="input-group-addon">Flavor:</div>
      <select class="form-control" name="item[flavor_id]">
        <%= Flavor.all.each do |flavor| %>
          <option value=<%= flavor.id %>><%= flavor.name %></option>
        <% end %>
      </select>
    </div>
  </div>
  <div class="form-group">
    <label class="sr-only" for="exampleInputEmail2">Type</label>
    <div class="input-group">
      <div class="input-group-addon">Type:</div>
      <select class="form-control" name="item[type_id]">
        <%= Type.all.each do |type| %>
          <option value=<%= type.id %>><%= type.name %></option>
        <% end %>
      </select>
    </div>
  </div>
    <div class="form-group">
    <label class="sr-only" for="exampleInputEmail2">Size</label>
    <div class="input-group">
      <div class="input-group-addon">Size:</div>
      <select class="form-control" name="item[size_id]">
        <%= Size.all.each do |size| %>
          <option value=<%= size.id %>><%= size.name %></option>
        <% end %>
      </select>
    </div>
  </div>
  <div class="form-group">
    <div class="input-group">
      <div class="input-group-addon">Quantity:</div>
      <input class="form-control" type="text" name="item[quantity]" placeholder="Enter quantity" value="1">
    </div>
  </div>
  <input type="hidden" name="item[cart_id]" value="<%= @cart.id %>" />
  <button type="submit" class="btn btn-default">Add to order</button>
<% end %>

<% unless @cart.items.count == 0 then %>
  <div class="well">
    <ul class="list-group">
    <% @cart.items.each do |item| %>
      <li class="list-group-item">
        <span class="badge"><%= number_to_currency(item.price) %></span>
        <h4>(<%= item.quantity %>)
          <%= item.size.name %>
          <%= "Bag".pluralize(item.quantity) %> of
          <%= item.flavor.name %> flavor
          <%= item.type.name %>
        </h4>
        <button type="button" class="btn btn-default btn-lg">
          <%= link_to "remove", item, method: "delete" %>
        </button>
      </li>
    <% end %>
  </ul>
  </div>
<% end %>
{'fraction_non_alphanumeric': 0.22208907529458757, 'fraction_numerical': 0.0051927301777511484, 'mean_word_length': 2.971451229183188, 'pattern_counts': {'":': 0, '<': 195, '<?xml version=': 0, '>': 195, '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': '3602734', 'n_tokens_mistral': 1830, 'n_tokens_neox': 1716, 'n_words': 332}