I have the following in a html.erb file:
<%= @location_list = [['test',2]] %>
<script type="text/javascript">
var test = <%= @location_list.to_json %>
alert(test);
</script>
And the alert is not showing up.
However if I do <%= @location_list = [[3,2]] %>
- The alert is showing up.
Why?