My problem is the following:
I want to use <%render => "xx"%> in a js.erb file - so I can't put it in my assets folder because render doesn't work in asset files.
I already tried to name it index.js.erb to get rails to include it automatically(it lies in the view folder, see below) but I guess that doesn't get included because I deleted the require_tree line in my admin.js(It's the "application.js" for my admin namespace). I can't use require tree simple because I don't want every js file in assets/javascripts/admin to be included.
I got my js file here:
views/admin/benefits/index.js.erb
I want to use it in the following view:
views/admin/benefits/index.html.erb
Am i overcomplicating something here? If not, how would I include it in my view? If it matters: I use rails 4.
render
and moved the .js.erb file to my Views folder.. but it now seems like the file isn't included in the asset pipeline at all. – Turgs Oct 12 '14 at 11:45