<commit_before>%h2 Harvests

- if can? :edit, @planting
  %a.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#", :role => "button"}
    = harvest_icon
    Record harvest

  .dropdown-menu.dropdown-secondary
    - PlantPart.all.each do |plant_part|
      = link_to harvests_path(return: 'planting', harvest: {crop_id: @planting.crop_id, planting_id: @planting.id, plant_part_id: plant_part.id}), method: :post, class: 'dropdown-item' do
        = plant_part.name

- if @planting.harvests.empty?
  %p No harvests recorded
  - if !planting.finished? && can?(:edit, planting) && can?(:create, Harvest)
    %p Record your harvests here to improve crop predictions, and you'll be able to compare with your garden next season.
- else
  .index-cards
    - @planting.harvests.each do |harvest|
      = render 'harvests/thumbnail', harvest: harvest
<commit_msg>Use planting, not @planting, in plantings/harvests view<commit_after>%h2 Harvests

- if can? :edit, planting
  %a.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#", :role => "button"}
    = harvest_icon
    Record harvest

  .dropdown-menu.dropdown-secondary
    - PlantPart.all.each do |plant_part|
      = link_to harvests_path(return: 'planting', harvest: {crop_id: planting.crop_id, planting_id: planting.id, plant_part_id: plant_part.id}), method: :post, class: 'dropdown-item' do
        = plant_part.name

- if planting.harvests.empty?
  %p No harvests recorded
  - if !planting.finished? && can?(:edit, planting) && can?(:create, Harvest)
    %p Record your harvests here to improve crop predictions, and you'll be able to compare with your garden next season.
- else
  .index-cards
    - planting.harvests.each do |harvest|
      = render 'harvests/thumbnail', harvest: harvest

{'fraction_non_alphanumeric': 0.14270443613041153, 'fraction_numerical': 0.0010689470871191875, 'mean_word_length': 4.032258064516129, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '7135802', 'n_tokens_mistral': 636, 'n_tokens_neox': 621, 'n_words': 164}