Rails: render partial in .coffee file
<p>I would like to use coffeescript to <code>.append</code> a partial when a <code>.change</code> event occurs. The problem is that the code below does not render the partial when the <code>.change</code> event occurs, instead <code>&lt;%= j render(:partial =&gt; 'participant_data').html_safe %&gt;</code> is shown as text on the website.</p>

<pre><code>$('input[type=number][id=quantity-select]').change -&gt;
  $('#insert-here').append('&lt;%= j render(:partial =&gt; \'participant_data\') %&gt;')
  return
</code></pre>

<p>When I run <code>$('#insert-here').append("Test")</code> the word <code>Test</code> is shown on the page. So I am targeting the correct <code>div</code> and am able to <code>append</code> text, but I would like to render the partial instead of the text.</p>

<p>Please let me know how I need to change the code so that the partial renders. </p>