rjv is a set of helpers that can inject any variables from rails to your javascript code.
Add this code at the bottom of your layout file (before closing body tag).
== rjv_tags
Now you can inject variables in your views:
- set_var 'someVar', 'someValue'
In javascript this variable will be available as:
console.log(app.vars.someVar)
Copyright (c) 2013 Michał Młoźniak.