How to use options in radio botton

Hi I am using radio botton,I am struggling to use options…following is
my code…


If i am using without checked option its working fine.If i use that its
throwing error…

Please help me

You don’t need the “options=”. That is just in the method definition to
let you know that the final argument is defaulted to an empty hash.


Selvaraj S. wrote:


William P.

One more thing I noticed. You need to supply a value for the :checked
key like :checked => true

radio_button(‘community’,‘default’,0,{:checked => true,:onClick =>

William P. wrote:

my code…


William P.