I am new to Javascript. I am writing a view in haml that fills a dropdown box by using JQuery and to fill that box JQuery requires the value of a Ruby variable s_id like following:
$(document).ready(function(){
var param = s_id //here s_id is a ruby variable
...
Here s_id is a ruby variable that is defined in the Haml view file for which the JS get called. Can anyone give any idea how to achieve the above thing.
<---this might be helpful