title: How to render a partial with javascript in Rails 3
body: <p>I am trying to use Javascript to render an <code>.html.erb</code> partial that itself contains safe Javascript.</p>
  
  <p><code>&lt;%= render :partial =&gt; "tasks" %&gt;</code> fails to render anything.</p>
  
  <p><code>&lt;%= escape_javascript( render :partial =&gt; "tasks" ) %&gt;</code> renders the HTML but the javascript is escaped, so it doesn't work.</p>
  
  <p>How can I get both the HTML and its embedded Javascript to render properly?</p>