Capture in rails to get javascript variable value


#1

<% @JSvar = capture do %>JSvar<% end %>
<%= @JSvar %>

how do i get capture to capture the actual variable value?