Answer the question
In order to leave comments, you need to log in
How to make sequential execution in the poll-quiz project?
Project: there are several polls (quizzes), each with several questions (questions) and results (results). In each question (question, answer options, correct answer), in the results (user answers, correct answers and points that show how many questions the user answered correctly).
How to more correctly organize a consistent answer to questions so that after clicking on "Answer Question" the user's answer option is recorded in the "results" in "user answers", and the correct answer in "correct answers"?
So far, the "create" method is being called from the question_controller controller. I do not understand how to make the page not reload, but the user's actions (how he answers questions) are recorded in the "results" table. Those. clicked in the first question on "Answer Question" and the answers (correct and user) were recorded in the results, etc. for the next questions.
Answer the question
In order to leave comments, you need to log in
Try to study this example. Here is just a step by step implementation.
https://github.com/limitedmage/railsquiz
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question