[Rails] Re: Re: Typecasting and boolean attributes

Kevin Olbrich
Thu, 12 Jan 2006 06:05:36 -0000

<%= radio_button ''group'', ''public'',
"1" %>
<%= radio_button ''group'', ''public'',
"0" %>

This works...

the params hash will look like this {... "group" =>
{"public"=>"1"}}
when the first one is selected.

The first radio button will be selected if ...

group.public == "1"

Hope that helps...

_Kevin


--
Posted via http://www.ruby-forum.com/.