title: Sharing templates beetween JS and Rails using Haml + Mustache
body: <p>I am trying to make common templates that used both by Rails and the client side, ie in coffescript.</p>
  
  <p>I use <a href="https://github.com/infbio/haml_assets" rel="nofollow noreferrer">hogan_assets</a> and <a href="https://github.com/leshill/hogan_assets" rel="nofollow noreferrer">haml_assets</a> to export templates to JS. However I can't find a way to use HAML and Mustache to render server-side views.</p>
  
  <p>Partial solution is described <a href="https://stackoverflow.com/questions/8215103/mustache-and-haml">here</a>, but it doesn't work with view helpers, ie, "render partial" doesn't work. </p>
  
  <p>For some unknown reason chaining of handlers, such as .mustache.haml, doesn't work, and I can't find neither good info on Rails template handler nor an example on how to build "chainable" handler.</p>