I have a JavaScript file called users.js and it is in app/assets/javascripts/users.js. I have it load in a single page using
<%= javascript_include_tag params[:controller] %>
I was thinking of using some Ruby code in the JavaScript file, so I changed the filename to users.js.erb. But when I do, the file shows up in my SublimeText project view as users.js.erb.js, and when I run my Rails app, I get a 404 error saying users.js.js couldn't be found.
Help? Thx.