I am currently trying to create a logic on my Site in Ruby on Rails. The Users should have the ability to answer a question via multiple checkboxes or text input. First attempts have failed when using check_box_tag. In the controller, I am checking
if @@user_solution.to_s == @@solution.to_s
at submitting and if true, the User gets to the next question. I wasn't able to get the solution the user provided via checkbox from the .erb File to the controller (The Question and the answers are in an erb File for each question).
Aucun commentaire:
Enregistrer un commentaire