Skip to content

Commit

Permalink
Remove distributer from sample_data
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorsmari committed May 12, 2021
1 parent 99cf23d commit 536281e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/tasks/sample_data/product_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,49 +18,42 @@ def product_data(enterprises)
fruit = Spree::Taxon.find_by(name: 'Fruit')
fungi = Spree::Taxon.find_by(name: 'Fungi')
producers = enterprises.select(&:is_primary_producer)
distributors = enterprises.select(&:is_distributor)
[
{
name: 'Garlic',
price: 20.00,
supplier: producers[0],
taxons: [vegetables],
distributor: distributors[0]
},
{
name: 'Fuji Apple',
price: 5.00,
supplier: producers[1],
taxons: [fruit],
distributor: distributors[0]
},
{
name: 'Mushrooms',
price: 50.00,
supplier: producers[1],
taxons: [fungi],
distributor: distributors[0]
},
{
name: 'Carrots',
price: 3.00,
supplier: producers[2],
taxons: [vegetables],
distributor: distributors[0]
},
{
name: 'Potatoes',
price: 2.00,
supplier: producers[2],
taxons: [vegetables],
distributor: distributors[0]
},
{
name: 'Tomatoes',
price: 2.00,
supplier: producers[2],
taxons: [vegetables],
distributor: distributors[0]
}
]
end
Expand Down

0 comments on commit 536281e

Please sign in to comment.