title: "render :partial" can't find files when called on its own
body: <p>I have a <strong>rails 2.2.2</strong> app with the following odd problem.</p>
  
  <p>There's a <code>.js.rjs</code> file, which is rendered to produce javascript as the response to a .js format query.</p>
  
  <p>If i do this, it works fine:</p>
  
  <pre><code>page.replace_html "search-results-resources-paginated", :partial =&gt; "search/discover_results"
  </code></pre>
  
  <p>Ie, it renders out the <code>app/views/search/_discover_results.html.erb</code> partial (which in turn calls other partials).  That's all working fine.</p>
  
  <p>However, I want to break this down into a couple of steps, where i render the partial into a text string, and then use that string in the javascript (i just want to do this for a bit of extra debugging).</p>
  
  <p>I'm trying to do this like so:</p>
  
  <pre><code>text = render(:partial =&gt; "search/discover_results")
  page.replace_html "search-results-resources-paginated", :text =&gt; text
  </code></pre>
  
  <p>this is now starting to complain about not being able to find the partial:</p>
  
  <pre><code>ActionView::TemplateError (Missing template search/_discover_results.erb in view path 
    /app/views:
    &lt;project folder&gt;/app/views/community:
    &lt;project folder&gt;/vendor/plugins/savage_beast/app/views:
    &lt;project folder&gt;/vendor/plugins/exception_notification/app/views:
    &lt;project folder&gt;/vendor/plugins/query_reviewer/lib/query_reviewer/lib/query_reviewer/views:
  ) on line #49 of app/views/search/discover.js.rjs:
  </code></pre>
  
  <p>(i've formatted the above a little, for clarity)</p>
  
  <p>If i tell render the actual file extension, like so:</p>
  
  <pre><code>text = render(:partial =&gt; "search/discover_results.html.erb")
  </code></pre>
  
  <p>then it finds that first partial, but i get the same problem with other partials this it references.  It's like <code>render</code> doesn't know that it's supposed to be looking for <code>html.erb</code> files, rather than just <code>.erb</code> files.  </p>
  
  <p>Is there an extra option i need to pass to <code>render</code> to make this work?</p>
  
  <p>thanks, Max</p>