Hi all
I have a check box in form, and I would like to enable/disable it
according to the value of the check box..
<% form_for(:query, @query,....
<%= f.check_box(:all_categories, :disabled => true, :onchange
=>''javascript:all_categories();'') -%><%=l
:All_categories %>
I would like to have something like :disabled => {
@query.all_categories.to_i == 1}
which will be evaluated as true or false
but I cannot write it , get into error..
any suggestion ?
thanks a lot
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---