I have a 'project' form as a partial. I'm trying to use jquery to render the partial when user clicks a button:
$('.projects').append("<%= render partial: 'projects/project') %>").html_safe
But using the above code is literally rendering "<%= render partial: 'projects/project') %>" on the page instead of the actual partial.
I believe renaming your file extension from xxx.js
to xxx.js.erb
might solve your problem.