Bug?

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?
-R

On 25 Apr 2008, at 23:24, Roger P. 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs