title: Unobtrusive jQuery autocomplete in Rails
body: <p>I'm using rails, but doing all my Javascript unobtrusively using jQuery in <code>application.js</code>.</p>
  
  <p>Unfortunately, this makes it quite difficult to reference URLs. For example, if I want to give a field autocomplete behavior, I have to hard-code the autocomplete URL in <code>application.js</code> since the rails <code>url_for</code> isn't available.</p>
  
  <p>Is it possible to make <code>application.js</code> use erb? Am I thinking about this the wrong way?</p>