As part of the goodprogrammer.ru course.
Ruby on Rails version of the world-famous game Who Wants to Be a Millionare.
- 15 Questions
- 15 Difficulty levels
- 3 Lifelines
- 50:50 (Fifty-Fifty)
- Phone a Friend
- Ask the Audience
- 3 Guarantee points
1 000
32 000
1 000 000
- 0 Mistakes
The application is covered with tests using: RSpec
Capybara
factory-bot
It is possible to recover the password from the account using e-mail.
Users with admin
status can load questions.
- Clone repo
$ git clone [email protected]:phobco/millionaire-game.git
- Install gems
$ bundle
- Create database and run migrations (
PostgreSQL
database is used)
$ rails db:create
$ rails db:migrate
- Load demo questions
$ rails db:seed
- Start server
$ rails s
Open localhost:3000
in a browser.
Run Rails console
$ rails c
Find the user's id
by name
> User.pluck(:id, :name)
# => [[1, "phobco"]]
Find User
by id
and set attribute is_admin
to true
> User.find(1).update(is_admin: true)
Admin panel is now available.