I have this working to populate a PRODUCT select list after selecting a CATEGORY:
jQuery ->
$('#request_product_id').parent().hide()
products = $('#request_product_id').html()
console.log(products)
$('#request_category_id').change ->
category = $('#request_category_id :selected').text()
options = $(products).filter("optgroup[label='#{category}']").html()
console.log(options)
if options
$('#request_product_id').html(options)
$('#request_product_id').parent().show()
else
$('#request_product_id').empty()
$('#request_product_id').parent().hide()
How do I make it so the PRODUCT select list includes_blank so it doesn't default to the first value in the table?
Thanks!