News for hackers. Stuff that matters.
Re:Rails 3.1 Adopts CoffeeScript, jQuery, Sass and.. Controv... by epochwolf on Thursday April 14, 2011 @01:47AM (#2445790)
Haml user here. I use haml because it allows me to see an entire page's code in a much cleaner format than erb with HTML. I can hammer out or rearrange chunks of HTML much faster in haml. To draw a comparison: haml is to HTML as yaml is to XML. Haml is denser and cleaner but it won't do everything. I still use erb and HTML for some templates because the haml just gets ugly.

Edit: a note, I am plenty comfortable writing vanilla HTML, I just prefer the speed and clarity of haml.

Re:Rails 3.1 Adopts CoffeeScript, jQuery, Sass and.. Controv... by jarin on Thursday April 14, 2011 @02:03AM (#2445818)
Just a tip: most of the time, when your haml gets messy, you can clean it up dramatically by using the :textile, :markdown, or :javascript formatters (or just put regular HTML in the :erb or :plain formatters).
Re:Rails 3.1 Adopts CoffeeScript, jQuery, Sass and.. Controv... by epochwolf on Thursday April 14, 2011 @10:58AM (#2447053)
I did not know of the :erb/:plain formatters, thanks for the suggestion.
Re:Rails 3.1 Adopts CoffeeScript, jQuery, Sass and.. Controv... by jarin on Thursday April 14, 2011 @08:59PM (#2449079)
You can even use string interpolation in them :)

i.e.:

  :textile
    Hi, my name is *#{@user.name}*!