Sort Product categories alphabetically by name and fixsample data by fixing taxons taxonomy id

This commit is contained in:
luisramos0
2018-10-27 22:19:30 +01:00
parent acb8ec772e
commit 82befd945b
2 changed files with 2 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ namespace :openfoodnetwork do
taxonomy_root = taxonomy.root
['Vegetables', 'Fruit', 'Oils', 'Preserves and Sauces', 'Dairy', 'Meat and Fish'].each do |taxon_name|
FactoryBot.create(:taxon, name: taxon_name, parent_id: taxonomy_root.id)
FactoryBot.create(:taxon, name: taxon_name, parent_id: taxonomy_root.id, taxonomy_id: taxonomy.id)
end
end