Sharing templates beetween JS and Rails using Haml + Mustache
===

I am trying to make common templates that used both by Rails and the client side, ie in coffescript.

I use [hogan_assets][1] and [haml_assets][2] to export templates to JS. However I can't find a way to use HAML and Mustache to render server-side views.

Partial solution is described [here][3], but it doesn't work with view helpers, ie, "render partial" doesn't work. 

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.


  [1]: https://github.com/infbio/haml_assets
  [2]: https://github.com/leshill/hogan_assets
  [3]: http://stackoverflow.com/questions/8215103/mustache-and-haml