shopping cart

This commit is contained in:
Karol Selak 2021-03-22 02:25:17 +01:00
parent 733870ce96
commit df7585c5e1
11 changed files with 79 additions and 11 deletions

View file

@ -15,7 +15,13 @@ books = Book.create([
title: 'Imaginary trip',
price: 3600,
published: true,
quantity: 0
quantity: 1
},
{
title: 'Winnie the Pooh',
price: 3700,
published: true,
quantity: 5
},
])
@ -32,12 +38,17 @@ authors = Author.create([
first_name: 'Rick',
last_name: 'Pickle'
},
{
first_name: 'Alan',
last_name: 'Milne'
},
])
books.first.authors << authors.first
books.second.authors << authors.first
books.third.authors << authors.second
books.third.authors << authors.third
books.fourth.authors << authors.fourth
User.create([
{