In my coding dilemma, I have a js.erb template housing this snippet:
var latlng = new google.maps.LatLng(<%= session[:lat] %>, <%= session[:lng] %>);
But now, I'm attempting to tackle the reverse task (embedding javascript into ruby):
<% session[:lat] = javascript_tag("document.write(location.lat());") %>