I have a .js.erb
file that renders a partial like so:
$("#tasks").append("<%= escape_javascript(render :partial => "task_from_app") %>");
I now need to put some javascript inside task_from_app
, but the javascript doesn't work.
Removing escape_javascript
doesn't work either - no error is shown and the partial isn't rendered on the page.
How can I get the partial to render if it includes javascript?