In my RoR app I would like to change a drop down list, which dispays a
list of colors selected from the database. Instead I would like to
create a radio button for each color. The user is allowed to check one
color and this will be saved back into the database as the color for
this user.
I don't know how to do this. Currently it looks like this:
Color.find(:all).each do |color|
<%= select :user, :color_id, color.id, :style=>"background:
##{color.rgb_value};" %>
end
Okay, the style part is not really required but it might make for an
interesting way for your users to select their color -- they'd see it
displayed on the UI.