Similar to this question: Checkboxes on Rails
What\'s the correct way of making radio buttons that are related to a certain question in Ruby on Rails? At the moment
I would suggest having a look at formtastic
It makes radio button and check box collections vastly easier and more concise. Your code would look like so:
<% semantic_form_for @widget, :html => {:class => 'my_style'} do |f| %>
<%= f.input :theme, :as => :radio, :label => "Theme:",
:collection => [ 'plain', 'desert', 'green', 'corporate', 'funky' ] %>
<% end %>
Formtastic is largely unobtrusive and can be mixed and matched with the "classic" form builders. You can also override the formtastic css class for the form as I did above with
:html => {:class => 'my_style'}
Have a look at the pertinent Railscasts.
Update: I've recently moved to Simple Form which has similar syntax to formtastic but is more lightweight and especially leaves the styling to your own css.