I posted a question yesterday about radio buttons and got some good
feedback, but I don''t think I was asking the right question.
I''m using a
group of three radio buttons to let me know if a user would like info
about there accounts sent to Home, Work, or Other. These values are
stored in a data base as booleans. Now, because of the was the helpers
are set up, it seems to me that I can''t have the buttons in a group
while still having them right the right database because of the "name"
attribute and how rails writes the html. For example, I need the radio
button Home to look something like this:
<%= radio_button_tag ''user'', ''d_home'',
true, {:id => ''user[d_home]''} %>
While the radio button for work looks like:
<%= radio_button_tag ''user'', ''d_work'',
true, {:id => ''user[d_work] } %>
Other,
<%= radio_button_tag ''user'', ''d_other'',
true, {:id => ''user[d_other]'' }
%>
Now, these field would hit the database correctly, but they do not,
however, belong to the same group, which is what I need. Any ideas,
thanks
~S
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---