In a <script type="text/javascript">
I want to access a static (won't ever change after Rails delivers page to client) string from Ruby to Javascript.
I use a push server called Juggernaut and it has to connect to the appropriate "channel", determined by a variable in the controller. The Juggernaut syntax for "listening" to the Juggernaut server is:
j.subscribe("channel", function(data) { })
I want it to be:
j.subscribe(<%= @myChannel %>, function(data) { })
Most likely your @myChannel
doesn't contain ".
You should use:
j.subscribe("<%= @myChannel %>", function(data) { })