classForMatrix: function(calendar_matrix) {
for (var i = 0; i<42; i++) {
cell = this.calendar_day_grid[i];
console.log(calendar_matrix(i));
if (calendar_matrix(i) == 1 ) {cell.addClassName("closed");}
}
},
and I get the following js error
TypeError: calendar_matrix is not a function
where am I wrong ?
if calendar_matrix is an array you need calendar_matrix[i] not
calendar_matrix(i).
On top of that you probably need to make it look like an array (ie
enclose it in , separate values with commas etc...). The
array_or_string_for_javascript looks like it will do that for you.