Jump To Content

LearnHub



Haml is the best template engine on Rails (Discussion)

wmoxam saidWed, 05 Mar 2008 15:55:03 -0000 ( Link )

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.

Actions
Vote
Current Rating
2
Rate Up
Rate Down
2 Total Votes
  1. Carsten saidThu, 06 Mar 2008 21:19:35 -0000 ( Link )

    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.

    Actions
    Vote
    Current Rating
    2
    Rate Up
    Rate Down
    2 Total Votes

    Post Comments

  2. hcatlin saidSat, 08 Mar 2008 15:54:02 -0000 ( Link )

    Of course I agree too.

    Actions
    Vote
    Current Rating
    1
    Rate Up
    Rate Down
    1 Total Vote

    Post Comments

  3. gabriel saidSun, 09 Mar 2008 07:36:37 -0000 ( Link )

    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? :)

    Actions
    Vote
    Current Rating
    0
    Rate Up
    Rate Down
    No Votes

    Post Comments

  4. RSL saidThu, 11 Sep 2008 23:18:53 -0000 ( Link )

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

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

    Actions
    Vote
    Current Rating
    1
    Rate Up
    Rate Down
    1 Total Vote

    Post Comments

Your Response
Textile is Enabled (View Reference)