An application that allows users to answer questions from different quizzes.
- Ruby
- Ruby on Rails
- PostgreSQL
- CanCanCan
- Devise
- SASS
To use this project you first need to have installed the following:
- Node.js
- Ruby
- PostgreSQL
- Rails
- Rbenv
- Ruby version
The version of ruby that is needed for this project is
- 3.0.3
Once you have installed them, you need to use the following command to clone the repository:
git clone git@github.com:Gambit142/Quiz-App.git
and then run
bundle install
Next, use this command to create the databases:
rails db:create
Next, use this command to run the migration files:
rails db:migrate
Finally, use the following command to start the live server:
rails s
open on your browser and type "localhost:3000"
If I were to add a type column in the Question Model
, I would use polymorphism to create the feature. I would implement the feature by doing the following:
- Create two columns on the Question model.
- One column would be the name of another Question Type model (For example
MultipleChoiceQuestion Model
) - The second would be the specific foreign key to that particular Question Type Model.
- This would enable me to create a distinct type of Question and I would handle the CRUD actions on the model the Question Model references.
👤 Francis Ugorji
- GitHub: @Gambit142
- LinkedIn: LinkedIn
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Hat tip to Nikolas Pontikos and Ismail Moghul for the guidance and constant communication.