In ajax heavy applications having a javascript/coffeescript file that is aware of the routes in a rails application seems common and reasonable. Yet it is not easy access the url_for helper in your assets.
I commonly see people inline a variable in their views that the javascript reads. And there are a few plugins that make routes available via a javascript object. See Accessing rails routes in javascript.
Am I missing an easy way to do this? Is this a bad practice? What is the alternative?