In a Rails 3.1 app, how can I safely embed some JSON data into an HTML document?
Suppose I have this in a controller action:
@tags = [ {name:\"ta
I think that if you try this it will work:
var tags_list = "<%== @tags.to_json.gsub('/', '\/') %>";
(Notice the double == and the " ")