<commit_before>%table.table.table-striped
  %thead
    %tr
      %th Ingredient
      %th.right-align= "Cost per #{current_user.weight_unit}"
      %th.right-align= "Daily(#{current_user.weight_unit})"
      %th.right-align= "Daily cost"
      %th.right-align= "30 days(#{current_user.weight_unit})"
      %th.right-align= "30 days Cost"
      %th.right-align= "Cost %"
  %tbody
    - @usages.each do |r|
      %tr
        %td= r["name"]
        %td.numeric= number_with_precision r["cost"].to_f, precision: 2, delimiter: ","
        %td.numeric= number_with_precision r["qty"].to_f, precision: 2, delimiter: ","
        %td.numeric= number_with_precision r["qty"].to_f * r["cost"].to_f, precision: 2, delimiter: ","
        %td.numeric= number_with_precision r["qty"].to_f * 30, precision: 2, delimiter: ","
        %td.numeric= number_with_precision r["qty"].to_f * r["cost"].to_f * 30, precision: 2, delimiter: ","
        %td.numeric= number_with_precision((r["qty"].to_f * r["cost"].to_f * 30) / (@cost * 30) * 100, precision: 2, delimiter: ",")
  %tfoot
    %tr
      %th
      %th
      %th.numeric= number_with_precision @weight, precision: 2, delimiter: ","
      %th.numeric= number_with_precision @cost, precision: 2, delimiter: ","
      %th.numeric= number_with_precision @weight * 30, precision: 2, delimiter: ","
      %th.numeric= number_with_precision @cost * 30, precision: 2, delimiter: ","
      %th<commit_msg>added formula list to views<commit_after>%table.table.table-striped
  %thead
    %tr
      %th Ingredient
      %th Formulas
      %th.right-align= "Cost per #{current_user.weight_unit}"
      %th.right-align= "Daily(#{current_user.weight_unit})"
      %th.right-align= "Daily cost"
      %th.right-align= "30 days(#{current_user.weight_unit})"
      %th.right-align= "30 days Cost"
      %th.right-align= "Cost %"
  %tbody
    - @usages.each do |r|
      %tr
        %td= link_to r["name"], edit_ingredient_path(r["id"])
        %td
          - Ingredient.find(r["id"]).used_in_formulas.each do |t|
            = link_to t.formula.formula_code, edit_formula_path(t.formula.id)
        %td.numeric= number_with_precision r["cost"].to_f, precision: 2, delimiter: ","
        %td.numeric= number_with_precision r["qty"].to_f, precision: 2, delimiter: ","
        %td.numeric= number_with_precision r["qty"].to_f * r["cost"].to_f, precision: 2, delimiter: ","
        %td.numeric= number_with_precision r["qty"].to_f * 30, precision: 2, delimiter: ","
        %td.numeric= number_with_precision r["qty"].to_f * r["cost"].to_f * 30, precision: 2, delimiter: ","
        %td.numeric= number_with_precision((r["qty"].to_f * r["cost"].to_f * 30) / (@cost * 30) * 100, precision: 2, delimiter: ",")
  %tfoot
    %tr
      %th
      %th
      %th
      %th.numeric= number_with_precision @weight, precision: 2, delimiter: ","
      %th.numeric= number_with_precision @cost, precision: 2, delimiter: ","
      %th.numeric= number_with_precision @weight * 30, precision: 2, delimiter: ","
      %th.numeric= number_with_precision @cost * 30, precision: 2, delimiter: ","
      %th
{'fraction_non_alphanumeric': 0.1696774193548387, 'fraction_numerical': 0.01870967741935484, 'mean_word_length': 3.2421340629274966, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6949511', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1081, 'n_words': 225}