2

I asked a specific question about problems I'm having with a specific gem intended to do this in a separate thread ( https://stackoverflow.com/q/18577033/1206117?sem=2 )

But I feel I may be on the "wrong boat" somehow because all of the questions I find about Rails/Haml/JST-templates are at least 2 years old, or go unanswered.

I'm writing an app with a lot of client-side JS and so want to use templates to render views (I'm using Backbone). I want to use Haml to write the templates.

I'm not looking for a debate about which gem/method is better, I'm looking for A WAY that works and has current support and active use. At present I cannot write my JS templates in Haml, and it's a bummer. I'm avoiding CoffeeScript at present since I'm still rather new to Javascript.

Community
  • 1
  • 1
Thomas Blom
  • 103
  • 7
  • I'd prefer not to add yet another language that is *sort of* like one I'm already using. Since I'm using Haml for server-side html generation, I'd like to do the same for my JS templating if possible... – Thomas Blom Sep 05 '13 at 21:19

2 Answers2

0

I've submitted an issue to the haml git repo.

https://github.com/haml/haml/issues/716

posit labs
  • 8,951
  • 4
  • 36
  • 66
0

Looks like https://github.com/netzpirat/haml_coffee_assets gives you what you want. (window.JST templates, written in HAML, with inline coffescript support)

Jordan Warbelow-Feldstein
  • 10,510
  • 12
  • 48
  • 79