title: _foo.mustache.haml templates
body: <p>I would like to use a single haml/mustache template, like this:</p>
  
  <pre><code>.foo
    %h2 {{title}}
  </code></pre>
  
  <p>That I can render two ways:</p>
  
  <p>1) As a partial and passing a hash:</p>
  
  <pre><code>render :partial =&gt; 'foo', :mustache =&gt; {:title =&gt; 'hello world'}
  =&gt;
  &lt;div class='foo'&gt;&lt;h2&gt;hello world&lt;/h2&gt;&lt;/div&gt;
  </code></pre>
  
  <p>2) As a partial without a hash for use  inside a script tag:</p>
  
  <pre><code>:javascript
    render :partial =&gt; 'foo'
  =&gt;
  &lt;script type='text/javascript'&gt;
    &lt;div class='foo'&gt;&lt;h2&gt;{{title}}&lt;/h2&gt;&lt;/div&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>I've tried various combinations of file names... "_foo.mustache.haml", for example, however rails won't recognize that extension.</p>
  
  <p>Also, I'm using the mustache_template_handler.rb from ryan bates:
  <a href="http://railscasts.com/episodes/295-sharing-mustache-templates" rel="nofollow">http://railscasts.com/episodes/295-sharing-mustache-templates</a></p>