Am I looking for a reliable way to convert a HAML template to an equivalent ERB / ​​HTML template?
Has anyone come across this?
I recommend you use the HAML2ERB service. It is really cool and generates valid ERB / ​​HTML code! Benefits:
The project was tested on a large HAML view (over 800 lines of markup) from a real production application, and it worked fine for me.
Good luck
try W2tags, you can even test it in: w2tags.heroku.com
I just wrote a HAML translator for ERB in Haskell. https://github.com/danchoi/herbalizer
If you are still trying to find a tool for this problem, let me know if this works well or not.
There seem to be some tricky problems translating HAML to ERB, as HAML supports some subtleties that are not easy to translate back to ERB without parsing Ruby code. A naive implementation using the HAML engine is here:
HAML for HTML demo
There is our branch haml2erb that does not support the entire HAML syntax, but it is good enough for us to write Rhomobile views in HAML.
Haml2Erb is a very amazing online converter. It really helps me a lot.