[Rails] Typecasting and boolean attributes

Derek Haynes
Thu, 12 Jan 2006 01:43:10 -0000

I have 2 radio buttons like this:

<%= radio_button ''group'', ''public'', true
%>
<%= radio_button ''group'', ''public'', false
%>

They hold the correct values when viewing the @group object. However,
when updating, it does not appear that the params[:group][:public]
value is being typecast correctly.

As params[:group][:public] = "true", "true" should be
resolved to a
"1" in the database. However, this is not occurring.

Has anyone else seen this issue or have a suggested fix?

Derek