Currently, I have a ruby variable accessible by the view called @json (which contains information I need in JSON format)
@json
However, I want to pass this in
Another way to do it is like this: var json = "#{ @json || 'null' }"