views:

34

answers:

1

I have metal working (thanks to Railscasts), but I have a haml template that I want to render instead of just plain text. Apparently you can render ERB , but I don't see any place to do the same with haml. Is it possible or will I just have to live with using the plain rails routing if I want to continue using haml?

Thanks!

A: 

Haml, like ERB, has a Ruby interface. However, also like ERB, using it without setting up the proper template caching (as Rails normally does for you) will make it very slow, almost certainly slower than Rails' routing. So be careful, and use #def_method rather than #render.

nex3