HAML example

I wanted find out for myself what the reported HAML goodness is all about, so I spent a little time to educate myself on the basics, and then I took to converting one of my Rails erb files over to HAML. I’m posting the before and after results here as HAML examples to give one more convincing example of how much easier it is to read and write HAML views than the more noisy erb you-must-close-every-tag format.
At the end of this article, I list a few links to resources I found useful as I was getting started with HAML in my Rails application development.

Before (erb):

After (HAML):

More HAML examples and links

Some Thoughts on HAML by Rob Conery

Daniel Fischer says HAML is beautiful poetry

This article by Eric Davis exposes why he thinks HAML is bad, so you may want to study what he has to say

HAML cheat sheet

another HAML Cheat Sheet on http://cheat.errtheblog.com

HAML questions on StackOverflow

HAML user group on Google



Learn more about HAML on Wikipedia

Latest HAML links on Coder I/O

Use this tool to automatically convert erb and html to HAML

HAML Videos

A video on HAML by Jason McCay from BarCamp Birmingham 2008-04-12

A HAML video from John Schult at merb day Atlanta 2008-12-06

HAML and SASS video (2007-11-20) – http://www.podcast.tv/video-episodes/episode-038-haml-and-sass-in-15-minutes-5214343.html

HAML and SASS video on Doctype video podcast Episode 38

3 thoughts on “HAML example”

Leave a Reply

Your email address will not be published. Required fields are marked *