shopping cart
This commit is contained in:
parent
733870ce96
commit
df7585c5e1
11 changed files with 79 additions and 11 deletions
13
db/seeds.rb
13
db/seeds.rb
|
@ -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([
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue