I'd like to make sure that my array stays like this in the view:
["Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Mon", "Tue"]
Instead of being converted to this:
["Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Mon", "Tue"]
The code in my erb file is for a highcharts graph:
categories: <%= @days %>,
In Rails, I have used the raw
method:
After following advice from Messy " returned from Rails 3 controller to view and Use ruby array for a javascript array in erb. Escaping quotes
However, loading all of ActionView to use one method seems to defeat the object of Sinatra.
Is there a better way?