Question: when accessing a website, you are asked to wait 10 minutes for example in order to make another request, suppose you are using a router as a mean to access internet (192.168.xxx.xxx), with "renewing" just the local ip address would the 10 minutes be skipped or the address given to the router is the one that should be changed?

Answer: 
If variables you are going to pass are request-independent - then just give it a name `*.js.erb`. 

For request-specific data (like controller name in your example) that's impossible. Javascript files are loaded independently from application requests and normally they are served as static assets by application server (apache, nginx). Thus if you want some custom script that is request-dependent put it inside your view template (.html.erb). 

Also you can definitely proxy request to your js file through application (define it's route in `routes.rb`) but that will not be considered as good code.
I believe if you have a javascript file with the extension `.js.erb` or `.js.coffee.erb`, all the extensions would be parsed from right to left, thus your code should understand some `erb` tags inside it, before parsing the `coffeescript` and ultimately the `js` part.