On 25 Apr 2008, at 23:24, Roger Pack wrote:
>
> radio_button_tag(:school_type, type, '''')
>
> => "<input checked=\"checked\"
id=\"school_type_online\"
> name=\"school_type\" type=\"radio\"
value=\"online\" />"
>
>
> Note that I passed it a default value of '''' and it spit
out that it
> that
> my radio button was checked. Is that right?
The third parameter is whether or not the radio is checked. false and
nil are false in ruby, everything else (including an empty string) is
true, and so your radio button gets checked.
Fred
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---