Y
Y
Yauheni Dakuka2015-08-04 11:56:53
Ruby on Rails
Yauheni Dakuka, 2015-08-04 11:56:53

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.
46c424ed442840449e6bb97a5cc8a7b5.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
N. Bekseitov, 2015-08-04
@ydakuka

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 question

Ask a Question

731 491 924 answers to any question