I have a javascript file accessed from a url like "/js/someFile.js". However I would like Yii to render the javascript file when it has been requested so I can include relevant data in it e.g. a parsed list from a database table.
I understand that one solution is to simply have the file static, and request the data from the server on initialization, however I was hoping to not do this.
Does anyone know how to achieve this without putting the JS inline in the current view? Or any reason why this is a terrible idea?