Q:

Ruby on rails add javascript variable to link_to url params

I have a javascript variable, I would to send along with my params when a person clicks a link. 
var js_variable = something;
...
<%= link_to_remote "Link Name", {:url => {url_params}, ajax_options}, {html_options} %>

how do I add js_variable to the url_params hash?? 
Using rails 2.3.8

A:

possibly this older question will be useful to you Rails3 - How to send Javascript Variable to a controller's action with the link_to helper? 
But it seems to me you should be using link_to_function and change the href at runtime

