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