So, it’s my turn to do something to get familiar with the new kid on the block – CoffeeScript .
The JS generated out of the CoffeeScript code is here – https://gist.github.com/1067162
1 2 3 4 5 6 7 jQuery.ajax url: base_path_to_query_controller, async: true, data: request_path + '&query_name=' + encodeURIComponent(query_name), dataType: 'script', type: 'POST', success: () -> $('#' + field_id).val('')
and this (look at “.join”):
1 2 3 jQuery.map grid_state, (pair) -> encodeURIComponent(pair) + '=' + encodeURIComponent(pair) .join '&'
This not all all that CoffeeScript has in stock, but it seems than in order to use things like list comprehension you have to write code directly in CoffeeScript.