Templates: use <%= raw array.to_json %> to output arrays in JS
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
$(function () {
|
||||
// Demograficos
|
||||
// Por edades
|
||||
var ages = <%= j @age_counts.to_a.to_json %>;
|
||||
var ages = <%= raw @age_counts.to_a.to_json %>;
|
||||
$('#pie').highcharts({
|
||||
chart: {
|
||||
plotBackgroundColor: null,
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
text: "<%= j t('.per_month') %>"
|
||||
},
|
||||
xAxis: {
|
||||
categories: <%= @months_names.to_json %>
|
||||
categories: <%= raw @months_names.to_json %>
|
||||
},
|
||||
yAxis: {
|
||||
min: 0,
|
||||
|
||||
Reference in New Issue
Block a user