I have a list of people from a render partial. Each person has a field called hoh. This is for head of household, and shows which person in the house that mail should be addressed to. I have seen lists of radio button pointing to the same variable that will only allow one button to be selected at a time to show the value the variable is/will be. What I want to do is to have a list of radio buttons, each pointing to that person''s hoh field with only one in the list selected at a time. I will set a name in the household model based on the value found in the person model Can''t find a way to do this with different variables referenced in the radio_button call. Please help with this or show me a different way to go.. By the way, I''m using Rails 2.3.9 Thanks Bob <bsm2h-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2011-Sep-02 22:44 UTC
Re: Need help with radio buttons.. Never seen this before
On Fri, Sep 2, 2011 at 2:29 PM, Bob Smith <bsm2th-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What I want to do is to have a list of radio buttons, each pointing to > that person''s hoh field with only one in the list selected at a time. > I will set a name in the household model based on the value found in > the person model > > Can''t find a way to do this with different variables referenced in the > radio_button call.So generate the radio button set using a common "name" attribute. Have you read the radio_button doc? What part isn''t clear? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.