title: Format.js will only render a partial that contains a single line
body: <p>Rails 3.2.1: I have the following div that calls a partial</p>
  
  <pre><code>&lt;div id="weighin"&gt;
  &lt;%= render :partial =&gt; "my_weight/weighin" %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The partial contains a form that posts ajax (ie has :remote => true) to a controller with:</p>
  
  <pre><code>respond_to do |format| 
     format.js
  end
  </code></pre>
  
  <p>The .js.erb file has a single line:</p>
  
  <pre><code>$("#weighin").html("&lt;%= render :partial =&gt; "my_weight/weighin1" %&gt;"); 
  </code></pre>
  
  <p>The _weighin1.html.erb partial file has a single line:</p>
  
  <pre><code>&lt;p&gt;&lt;%= @my_weight[1].weight %&gt;&lt;/p&gt;
  </code></pre>
  
  <p>This works, in that the original div is replaced with the value of the @my_weight field - so the fundamental structure is all working ok</p>
  
  <p>However, Rails will not handle any more code in the partial - if I add so much as a carriage return to the end of that one line, the server log confirms all ok, but no script gets run on the page - ie nothing changes.</p>
  
  <p>The same happens if I try to put more html in the partial, but put it all in a single line - this doesnt run either.</p>
  
  <p>How can I output more than a single short statement in a partial?</p>