diff options
author | Marius Peter <dev@marius-peter.com> | 2025-09-04 20:55:03 +0200 |
---|---|---|
committer | Marius Peter <dev@marius-peter.com> | 2025-09-04 20:55:03 +0200 |
commit | 8ba568ae0ebe715b5da453681eb141886f1977a8 (patch) | |
tree | 3bf3a3d5b41286d0a6da8895857314393bae1db2 /db/seeds.rb | |
parent | 8f8cea2a0408918629dc8bab03495530861a71f3 (diff) |
Start small, address critical customer needs, /then/ scale.
Diffstat (limited to 'db/seeds.rb')
-rw-r--r-- | db/seeds.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/db/seeds.rb b/db/seeds.rb index 848db0d..245247e 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -8,6 +8,15 @@ # MovieGenre.find_or_create_by!(name: genre_name) # end -Dir[Rails.root.join("db/seeds/*.rb")].sort.each do |seed| - load seed +MODELS = [ NutrientMeasurement, + NutrientProfile + ].freeze + +def seed_file_for(model_class) + Rails.root.join("db", "seeds", "#{model_class.name}.rb") +end + +MODELS.each do |model| + load seed_file_for(model) + printf "%-22s %3s\n", model.name, model.count end |