app/helpers/application_helper.rb
# javascript function to change selected_elements in set
# element is selected by checking its checkbox and removed by unchecking.
# and input (id = "selected") value results in comma separated set of selected elements
javascript function to change selected_elements in set
element is selected by checking its checkbox and removed by unchecking.
and input (id = "selected") value results in comma separated set of selected elements
javascript function to change selected_elements in set element is selected by checking its checkbox and removed by unchecking . and input ( id = " selected " ) value results in comma separated set of selected elements
def change_selected_elements(element, selected)
    code  = "var selected_elements = $('#{selected}').value.split(',').without('');"
    code += "if ($(this).checked) {$('#{selected}').value = selected_elements.concat('#{element}').join(',')}"
    code += "else {$('#{selected}').value = selected_elements.without('#{element}').join(',')};"
  end
def change_selected_elements ( element , selected ) code = "var selected_elements = $('#{selected}').value.split(',').without('');" code += "if ($(this).checked) {$('#{selected}').value = selected_elements.concat('#{element}').join(',')}" code += "else {$('#{selected}').value = selected_elements.without('#{element}').join(',')};" end
javascript function to change selected_elements in set
element is selected by checking its checkbox and removed by unchecking.
javascript function to change selected_elements in set element is selected by checking its checkbox and removed by unchecking .
element
<not_specific>
selected
<not_specific>