Jump To Content

Haml is the best template engine on Rails

1 Posts

wmoxam
  • Authority 411
Post Body
wmoxam said:

By removing the non-data characters and using whitespace to indicate nesting, Haml increases the information density of templates. It also eliminates the problem of missing end tags as they are generated for you.

  • Quote
  • Posted 7 months ago.
Carsten
  • Authority 339
Post Body
Carsten agreed:

I totally agree, and in the real world it’s speed is just fine, every single HTML template in LearnHub is written in Haml and it’s pretty peppy! We also use Sass for all of our CSS it brings the Haml ideology to CSS and greatly increases productivity.

  • Quote
  • Posted 7 months ago.
hcatlin
  • Authority 40
Post Body
hcatlin agreed:

Of course I agree too.

  • Quote
  • Posted 7 months ago.
gabriel
  • Authority 108
Post Body
gabriel agreed:

Haml rawks! My only gripe with it is that it encapsulates element attributes with single quotes by default instead of double quotes. Single quotes may look nicer when quoting ruby strings and what-not, but in markup, doubles are definitely superior. Just view source this page and you’ll see what I mean; it’s a mish-mash of single– and double-quoted attributes, and it doesn’t look at all pretty.

Can we expect to see this issue addressed in the next release, Hampton? :)

  • Quote
  • Posted 7 months ago.
Carsten
  • Authority 339
Post Body
Carsten agreed with:
gabriel
gabriel’s post:
Citation Body

Haml rawks! My only gripe with it is that it encapsulates element attributes with single quotes by default instead of double quotes. Single quotes may look nicer when quoting ruby strings and what-not, but in markup, doubles are definitely superior. Just view source this page and you’ll see what I mean; it’s a mish-mash of single– and double-quoted attributes, and it doesn’t look at all pretty.

Can we expect to see this issue addressed in the next release, Hampton? :)

Gabe, the majority of people will be reading the rendered page, not the markup.

  • Quote
  • Posted 6 months ago.
RSL
  • Authority 23
Post Body
RSL agreed:

Gabe, throw this in an initializer and yr all good:

Haml::Template.options = {:attr_wrapper => "\""}

  • Quote
  • Posted about 1 month ago.
  • You will be able to edit your reply for 10 minutes after you post it.

Stats

  • 1 Post

Activity