I have a radio button in my Rails application:
.<% @votes.each do |vote| %> .<%= radio_button_tag \"escolha\", \"#{vote.id}\" %> .<% end %>
In your votes class do something similar to this:
class Myvotes < ActiveRecord::Base validates :votes, :presence => true end
Please refer to the 8.2 Validations section of the Rails release notes, this tutorial, and the Rails API documentation.