Templates: use <%= raw array.to_json %> to output arrays in JS

This commit is contained in:
Saverio Trioni
2016-05-17 07:35:41 +02:00
parent 29e8427564
commit 5e52b5aa12
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -60,7 +60,7 @@
text: "<%= j t('.per_month') %>"
},
xAxis: {
categories: <%= @months_names.to_json %>
categories: <%= raw @months_names.to_json %>
},
yAxis: {
min: 0,