Validate_presence_of radio button selected?


I’m trying to force a user to pick one of several options, but
validate_presence_of doesn’t seem to work on my radio buttons. Has
anyone else had this problem?

validates_presence_of :category_id


<% category_list.each do |cat| %>
<%= radio_button (:video, :category_id, %>

<%= %>

<% end %>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs