I have a radio button in my Rails application:
.<% @votes.each do |vote| %>
.<%= radio_button_tag "escolha", "#{vote.id}" %>
.<% end %>
I want to make a java-script code that validates this when no option is chosen.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In your votes class do something similar to this:
Please refer to the 8.2 Validations section of the Rails release notes, this tutorial, and the Rails API documentation.