I\'ve got the following code in a Javascript ERB file:
$(document).ready(function() {
$(\"#workout-week\").append(
<%= escape_javascript(render :par
With the new asset pipeline, inside static assets (/app|lib|vendor/assets/) you can use some 'static' helpers (i.e. <%= asset_path "/foo/bar" %>), because you just compile them once (if you're on production i.e.) and not every time you make an http req. Therefore, it makes no sense to use methods like render (or general 'dynamic' stuff) inside a static asset.
For your particular case, you could use both *.js.erb views (that will 'match' a particular action inside the controller) or javascript rendered directly inside the html.