rails up to 7.0and ruby to 2.7.2
This commit is contained in:
parent
c67e9b5be8
commit
3d81dd6b57
23 changed files with 485 additions and 502 deletions
|
|
@ -8,10 +8,10 @@ def seed_group_orders
|
|||
|
||||
# order 3..12 times a random article
|
||||
go = og.group_orders.create!(order: order, updated_by_user_id: 1)
|
||||
(3 + rand(10)).times do
|
||||
(rand(10) + 3).times do
|
||||
goa = go.group_order_articles.find_or_create_by!(order_article: order.order_articles.offset(rand(noas)).first)
|
||||
unit_quantity = goa.order_article.price.unit_quantity
|
||||
goa.update_quantities rand([4, 2 * unit_quantity + 2].max), rand(unit_quantity)
|
||||
goa.update_quantities rand([4, unit_quantity * 2 + 2].max), rand(unit_quantity)
|
||||
end
|
||||
end
|
||||
# update totals
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue