Hacker News new | ask | show | jobs
by jarin 5552 days ago
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).
1 comments

I did not know of the :erb/:plain formatters, thanks for the suggestion.
You can even use string interpolation in them :)

i.e.:

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