Hi Kevin,
actually I do this with javascript and a snippet of ruby
may somebody know a better way to do this.
regards
Rafael
--------------
case params[:apply_as]
when "spontanous"
@apply_as_spontanous = ''checked''
when "specific"
@apply_as_specific = ''checked''
else
@apply_as_specific = ''checked''
end
------------
<input type="radio" name="apply_as"
id="apply_as" value="spontanous" <
%= "#{@apply_as_spontanous}" %> /> Spontanbewerbung
<input type="radio" name="apply_as"
id="apply_as" value="specific" <
%= "#{@apply_as_specific}" %> /> Bewerbung auf Offene Vakanz
On 21 Jun., 22:48, "Kevin R."
<ktr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi all,
>
> I''m a new Ruby on Rails user, and I''m trying to make a
page with
> several groups of 3 radio buttons. The user chooses one button from
> each group, then clicks the save button, where each selection is
> stored in the database. My question is how I can know which button was
> selected - is there a method like get_checked_button, or do I have to
> cycle through each group and see which of the three is checked? If the
> latter is the case, how would I do that?
>
> Thanks!
>
> -Kevin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---