Is there a way to include a ruby variable as a parameter in a JavaScript function for a Rails checkbox? Here is an example of what I'm trying to do:
<%= check_box_tag 'Sugestão', prato.id , prato.sugestao,:class => prato.categoria_pratos_id, :id => "task-check3",:onchange =>"checkbox('<%=prato.categoria_pratos_id%>')" %>
The JavaScript checkbox function is working correctly. However, when I try to pass the id as a parameter, it results in an application error. How can this be resolved?