mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
Update seeds.rb with sample user (#326)
* Update seeds.rb with sample user Signed-off-by: Muhammed Kılıç <muhammeddkilicc@gmail.com> * Update create with create_or_find_by Co-authored-by: Sebastián Caraballo <sebastiancaruy1@gmail.com> Signed-off-by: Muhammed Kılıç <muhammeddkilicc@gmail.com> * Update user create with create_or_find_by Co-authored-by: Sebastián Caraballo <sebastiancaruy1@gmail.com> Signed-off-by: Muhammed Kılıç <muhammeddkilicc@gmail.com> * Update seed data * Update README with seed credentials --------- Signed-off-by: Muhammed Kılıç <muhammeddkilicc@gmail.com> Co-authored-by: Sebastián Caraballo <sebastiancaruy1@gmail.com>
This commit is contained in:
parent
774c1518e8
commit
595cfeff9a
2 changed files with 13 additions and 1 deletions
|
@ -49,7 +49,11 @@ rails db:setup
|
|||
bin/dev
|
||||
```
|
||||
|
||||
And visit [http://localhost:3000](http://localhost:3000)
|
||||
And visit [http://localhost:3000](http://localhost:3000) to see the app.
|
||||
You can use the following credentials to log in:
|
||||
|
||||
- Email: `user@maybe.local`
|
||||
- Password: `password`
|
||||
|
||||
### Email
|
||||
|
||||
|
|
|
@ -7,3 +7,11 @@
|
|||
# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
|
||||
# MovieGenre.find_or_create_by!(name: genre_name)
|
||||
# end
|
||||
|
||||
# Create the default user
|
||||
family = Family.create_or_find_by!(name: "The Maybe Family")
|
||||
puts "Family created: #{family.name}"
|
||||
user = User.create_or_find_by!(
|
||||
first_name: "Josh", last_name: "Maybe", email: "user@maybe.local",
|
||||
password: "password", password_confirmation: "password", family_id: family.id)
|
||||
puts "User created: #{user.email} for family: #{family.name}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue