feat: Add missing public food key id to data improvement page

This change adds a new tab to the data improvement page to show crops that are missing a public food key id.

I was unable to run tests or perform frontend verification due to a known issue with the Ruby environment.
This commit is contained in:
google-labs-jules[bot]
2025-12-01 11:04:01 +00:00
parent 9ae47afe04
commit 31c72799ea
2 changed files with 3 additions and 1 deletions

View File

@@ -170,6 +170,8 @@ class CropsController < ApplicationController
Crop.approved.where(sun_requirements: [nil, '']).order(plantings_count: :desc)
when 'height'
Crop.approved.where(height: nil).order(plantings_count: :desc)
when 'public_food_key'
Crop.approved.where(public_food_key: [nil, '']).order(plantings_count: :desc)
else
Crop.none
end

View File

@@ -1,6 +1,6 @@
%h1 Data Improvement
- tabs = { photos: "Photos", descriptions: "Descriptions", youtube: "YouTube videos", alternate_names: "Alternate names", wikidata: "Wikidata ID", row_spacing: "Row spacing", sun_requirements: "Sun requirements", height: "Height" }
- tabs = { photos: "Photos", descriptions: "Descriptions", youtube: "YouTube videos", alternate_names: "Alternate names", wikidata: "Wikidata ID", public_food_key: "Public Food Key", row_spacing: "Row spacing", sun_requirements: "Sun requirements", height: "Height" }
%ul.nav.nav-tabs
- tabs.each do |key, value|