I had a problem linking an unobtrusive js file to a view.
I have a name named.html.erb
...
<div id="fooBar">say bye!</div>
...
I also have a js file index.js.erb
$("#fooBar").html("say hello!")
I am currently receiving a bye by message because the javascript file is not executing.
What am I doing wrong?
It seems to me that js.erb is not used for this purpose. And I just need to add the script link to the regular .js file where the specific client logic is stored
Thank you Alex
source
share