access variables in controller from link_to_remote

This is really easy and simple but...

I have view <%=link_to_remote 'this', {:url=>{:action=>'action'}, :with => "'name=' + $('text_field_id').value" } %>

When I'm in the controller, how do I access the variable 'name'? I thought it was params[:name] but that returns nil...

Thanks

This is really easy and simple but...

I have view <%=link_to_remote 'this', {:url=>{:action=>'action'}, :with => "'name=' + $('text_field_id').value" } %>

When I'm in the controller, how do I access the variable 'name'? I thought it was params[:name] but that returns nil...

This is really easy and simple but...

I have view <%=link_to_remote 'this', {:url=>{:action=>'action'}, :with => "'name=' + $('text_field_id').value" } %>

When I'm in the controller, how do I access the variable 'name'? I thought it was params[:name] but that returns nil...

---- look in your logs (presumably log/development.log) to see what it was that was posted back to your controller.

In particular that will screw up if your text field contains an
ampersand. You should use encodeURIComponent to guard against that.

Fred