I’m porting my 3.0 Rails project to 3.1 rc4 and I got a js.erb which is located in views folder that places url of one of my controllers in result js.
I want to move this js.erb under assets because there are no logic except this and keeping controller just for that is an overhead in Rails 3.1 from my point of view.
The problem is that I can’t access routes in js.erb placed under assets. I understand that routes are coupled with controllers and because .erb files in assets folder don’t have controllers so this might be expected.
But still maybe this is possible somehow or at least how to refer to the root url of my application so I can at least refer to it in js.erb?