Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
516 views
in Technique[技术] by (71.8m points)

ruby on rails - Is there a good HAML -> ERB/HTML converter?

I'm looking for a reliable way to convert a HAML template to an equivalent ERB/HTML template?

Has anyone come across one?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I recommend you to use HAML2ERB service. It's really cool and generates valid ERB/HTML code! The benefits are:

  1. HTTPS - if you need some security for your markup;
  2. API - you could write the plugin or something else for your IDE;
  3. Simple - just put your HAML code to the textbox and click "Convert";
  4. Project is active - the author is currently working on it.

Project was tested on big HAML views (over 800 lines of markup) from the real production app and it worked fine for me.

Good luck!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...