I have the following code (somewhat chauvinistic, yes I know, but binary is binary) that should let the user select between male / female: <%= radio_button "user", "is_male", 0 %> Female <%= radio_button "user", "is_male", 1 %> Male However, it appears that radio_button demands that the third parameter be a string: Showing /signup/signup_step_two.rhtml where line #34 raised: private method `gsub'' called for 0:Fixnum Is there some way of using integers with radio_button? If not, why does this restriction exist? Thanks, Duane Johnson (canadaduane) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Duane Johnson wrote:> I have the following code (somewhat chauvinistic, yes I know, but binary > is binary) that should let the user select between male / female: > > <%= radio_button "user", "is_male", 0 %> Female > > <%= radio_button "user", "is_male", 1 %> Male > > However, it appears that radio_button demands that the third parameter > be a string:It''s a bug recently introduced. I patched it today. Take a look here: http://dev.rubyonrails.com/ticket/1352 rgds Dema -- http://dema.ruby.com.br - Rails development from a .NET perspective
> It''s a bug recently introduced. I patched it today. Take a look here: > http://dev.rubyonrails.com/ticket/1352Thank-you, Dema. Apparently I''m being introduced to the hazards of edge rails :) Duane Johnson (canadaduane) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Duane Johnson wrote:>> It''s a bug recently introduced. I patched it today. Take a look here: >> http://dev.rubyonrails.com/ticket/1352 > > > Thank-you, Dema. Apparently I''m being introduced to the hazards of edge > rails :)Ain''t we all? And we like it! :) Dema -- http://dema.ruby.com.br - Rails development from a .NET perspective