Currently, I have a ruby variable accessible by the view called @json
(which contains information I need in JSON format)
However, I want to pass this into a script area such as
<script type="text/javascript" charset="utf-8">
//Want @json to be usable here
</script>
Is there any way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…