I know this is possibe inside a js function
<% session[:comment] = "This is the comment" %>
But is there any way to make this work.
var comment = "This is the comment";
<% session[:comment] = comment %>
Because in my app I get this comment from a text field. So i have to set the string dynamically. So is there a way I can make this happen.