How to use this with Rails app? #1

millisami opened this Issue Jan 16, 2010 · 3 comments

4 participants


I'm pretty impressed with HAML like js rederer.
But I'm confused how to use this with Rails app??
Where to put what and how to render on the view as a callback to replace the rendered jaml?


Jaml is entirely JavaScript - I hadn't really thought of it being used as a renderer in Rails. It would be a better fit for client-side rendering or use within a JavaScript framework built on Node or Narwhal or something


You can also look on erector, that does pretty much the same (and a little more), and has a plugin for rails. The difference is: it is for server-side html generation, while this is for client-side. Pick your poison.


you can drop Node.js Template.js and Jaml.js in /lib/assets/javascripts and require them in application.js file and then you can create template.js in app/assets/javascripts..

PS. I had no luck in using .coffee, something with the indent..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment