rubocop corrections
This commit is contained in:
parent
c63c6bc448
commit
de29815686
72 changed files with 468 additions and 311 deletions
124
db/seeds.rb
124
db/seeds.rb
|
@ -1,48 +1,50 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
books = Book.create([
|
||||
{
|
||||
title: 'Journey to the Center of the Earth',
|
||||
price: 10900,
|
||||
published: true,
|
||||
quantity: 100
|
||||
},
|
||||
{
|
||||
title: 'From the Earth to the Moon',
|
||||
price: 6300,
|
||||
published: false,
|
||||
quantity: 0
|
||||
},
|
||||
{
|
||||
title: 'Imaginary trip',
|
||||
price: 3600,
|
||||
published: true,
|
||||
quantity: 1
|
||||
},
|
||||
{
|
||||
title: 'Winnie the Pooh',
|
||||
price: 3700,
|
||||
published: true,
|
||||
quantity: 5
|
||||
},
|
||||
])
|
||||
{
|
||||
title: 'Journey to the Center of the Earth',
|
||||
price: 10_900,
|
||||
published: true,
|
||||
quantity: 100
|
||||
},
|
||||
{
|
||||
title: 'From the Earth to the Moon',
|
||||
price: 6300,
|
||||
published: false,
|
||||
quantity: 0
|
||||
},
|
||||
{
|
||||
title: 'Imaginary trip',
|
||||
price: 3600,
|
||||
published: true,
|
||||
quantity: 1
|
||||
},
|
||||
{
|
||||
title: 'Winnie the Pooh',
|
||||
price: 3700,
|
||||
published: true,
|
||||
quantity: 5
|
||||
}
|
||||
])
|
||||
|
||||
authors = Author.create([
|
||||
{
|
||||
first_name: 'Jules',
|
||||
last_name: 'Verne'
|
||||
},
|
||||
{
|
||||
first_name: 'Dick',
|
||||
last_name: 'Pick',
|
||||
},
|
||||
{
|
||||
first_name: 'Rick',
|
||||
last_name: 'Pickle'
|
||||
},
|
||||
{
|
||||
first_name: 'Alan',
|
||||
last_name: 'Milne'
|
||||
},
|
||||
])
|
||||
{
|
||||
first_name: 'Jules',
|
||||
last_name: 'Verne'
|
||||
},
|
||||
{
|
||||
first_name: 'Dick',
|
||||
last_name: 'Pick'
|
||||
},
|
||||
{
|
||||
first_name: 'Rick',
|
||||
last_name: 'Pickle'
|
||||
},
|
||||
{
|
||||
first_name: 'Alan',
|
||||
last_name: 'Milne'
|
||||
}
|
||||
])
|
||||
|
||||
books.first.authors << authors.first
|
||||
books.second.authors << authors.first
|
||||
|
@ -51,22 +53,22 @@ books.third.authors << authors.third
|
|||
books.fourth.authors << authors.fourth
|
||||
|
||||
User.create([
|
||||
{
|
||||
email: 'abc@o2.pl',
|
||||
password: 'aaaaaaaa',
|
||||
role: :admin,
|
||||
status: :ready
|
||||
},
|
||||
{
|
||||
email: 'abcd@o2.pl',
|
||||
password: 'aaaaaaaa',
|
||||
role: :customer,
|
||||
status: :ready
|
||||
},
|
||||
{
|
||||
email: 'abcde@o2.pl',
|
||||
password: 'aaaaaaaa',
|
||||
role: :customer,
|
||||
status: :ready
|
||||
},
|
||||
])
|
||||
{
|
||||
email: 'abc@o2.pl',
|
||||
password: 'aaaaaaaa',
|
||||
role: :admin,
|
||||
status: :ready
|
||||
},
|
||||
{
|
||||
email: 'abcd@o2.pl',
|
||||
password: 'aaaaaaaa',
|
||||
role: :customer,
|
||||
status: :ready
|
||||
},
|
||||
{
|
||||
email: 'abcde@o2.pl',
|
||||
password: 'aaaaaaaa',
|
||||
role: :customer,
|
||||
status: :ready
|
||||
}
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue