title: How to include js.erb file in view folder
body: <p>I have a JavaScript file to use with a view. There needs to be Ruby code in it, and I need to do <code>render</code> in Ruby, so I understand that I can't put the JavaScript file in the asset pipeline. I can put it in the same view folder as the <code>.html.erb</code> file.</p>
  
  <p>How do I include the JavaScript file, or use that JavaScript file for that view file? I tried <code>javascript_include_tag</code> in my view (that uses the asset pipeline apparently), using script <code>src="myfile.js"</code> for the <code>myfile.js.erb</code> file (but it can't find <code>myfile.js</code>), and names my <code>js.erb</code> file (<code>users.js.erb</code>) the same as my <code>.html.erb</code> file (<code>users.html.erb</code>), but all to no avail.</p>