On 7 March 2013 12:27, NN Dodhia <aca10...@sheffield.ac.uk> wrote:
> Hi i have this code :
> <%= f.input :xyz, :label => "Select a number:",:collection =>
> ["twenty.","forty"],
>   :as => :radio%>

Can you point to the docs for the use of :as => :radio in that way, I
can't seem to find it.

>
> where xyz is a boolean field, so when i submit my form and check in the
> database it shows the selection as false even though i've selected a radio
> button and there's also a validates presence of

Note that false is a value, so validates presence of will be quite
happy with false.  It is not the same as nil.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to