Topic: Passing in Ruby Array to Javascript
I have an array that I created in my controller called @boundary_Count and I am trying to use these as an input parameter to my javascript function, function init(totalArray){}. Currently here is what my view looks like when I attempt the call, I've tried two ways without success:
<body onload="init(<%=@boundary_Count.to_json%>)">And
<body onload="init(#{@boundary_Count.to_json})">