Alex Rivera | Logout

Rails - Radio Buttons for collection sets

Asked 2010-11-11T05:38:12.127
15

I have the following which outputs a select box:

<%= f.label :request_type_id %><br />
<% requestTypes = RequestType.all %>
<%= f.collection_select :request_type_id, requestTypes, :id, :title, :prompt => true %>

What is the rails method to instead output Radio Buttons?

Edit
Report

1 Answer

-1

I don't think there is a default option in Rails to achieve this; luckily plugins are your friend and I think that what you want is very easy with simple_form.

answered 2010-11-11T07:11:30.990

Your Answer